Merge pull request 'feat(dbml): @postgres/@sqlite dialect directives (#19)' (#27) from issue-19-dbml-directives into master
Release / test (push) Successful in 58s
Release / release (push) Successful in 5m13s
Release / pkg-aur (push) Successful in 1m0s
Release / pkg-rpm (push) Successful in 2m55s
Release / pkg-deb (push) Successful in 3m21s

Reviewed-on: #27
This commit was merged in pull request #27.
This commit is contained in:
2026-09-08 14:19:02 +00:00
27 changed files with 1674 additions and 91 deletions
+9 -7
View File
@@ -10,17 +10,19 @@ func newReaderOptions(filePath, connString string) *readers.ReaderOptions {
FilePath: filePath,
ConnectionString: connString,
Prisma7: prisma7,
StrictDirectives: strictDirectives,
}
}
func newWriterOptions(outputPath, packageName string, flattenSchema bool, nullableTypes, nullableArrays string, continueOnError bool) *writers.WriterOptions {
return &writers.WriterOptions{
OutputPath: outputPath,
PackageName: packageName,
FlattenSchema: flattenSchema,
NullableTypes: nullableTypes,
NullableArrays: nullableArrays,
Prisma7: prisma7,
ContinueOnError: continueOnError,
OutputPath: outputPath,
PackageName: packageName,
FlattenSchema: flattenSchema,
NullableTypes: nullableTypes,
NullableArrays: nullableArrays,
Prisma7: prisma7,
ContinueOnError: continueOnError,
StrictDirectives: strictDirectives,
}
}
+6 -4
View File
@@ -10,10 +10,11 @@ import (
var (
// Version information, set via ldflags during build
version = "dev"
buildDate = "unknown"
prisma7 bool
noVersion bool
version = "dev"
buildDate = "unknown"
prisma7 bool
noVersion bool
strictDirectives bool
)
func init() {
@@ -72,6 +73,7 @@ func init() {
rootCmd.AddCommand(reportCmd)
rootCmd.PersistentFlags().BoolVar(&prisma7, "prisma7", false, "Use Prisma 7 generator conventions when reading/writing Prisma schemas")
rootCmd.PersistentFlags().BoolVar(&noVersion, "no-version", false, "Suppress the RelSpec version header")
rootCmd.PersistentFlags().BoolVar(&strictDirectives, "strict-directives", false, "Fail on unknown or untranslatable DBML dialect directives (@postgres:, @sqlite:, …)")
}
// printVersionHeader prints the "RelSpec <version> (built: <date>)" banner