Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeFilename ¶ added in v1.0.7
SanitizeFilename removes quotes, comments, and invalid characters from identifiers to make them safe for use in filenames. This handles: - Double and single quotes: "table_name" or 'table_name' -> table_name - DBML comments: table [note: 'description'] -> table - Invalid filename characters: replaced with underscores
Types ¶
type Writer ¶
type Writer interface {
// WriteDatabase takes a Database model and writes it to the desired format
WriteDatabase(db *models.Database) error
// WriteSchema takes a Schema model and writes it to the desired format
WriteSchema(schema *models.Schema) error
// WriteTable takes a Table model and writes it to the desired format
WriteTable(table *models.Table) error
}
Writer defines the interface for writing database specifications to various output formats at different granularity levels
type WriterOptions ¶
type WriterOptions struct {
// OutputPath is the path where the output should be written
OutputPath string
// PackageName is the Go package name (for code generation)
PackageName string
// Additional options can be added here as needed
Metadata map[string]interface{}
}
WriterOptions contains common options for writers
Click to show internal directories.
Click to hide internal directories.