Documentation
¶
Index ¶
- Constants
- func FindTableByAlias(schema model.Schema, alias string) (string, bool)
- func QueryFile(content string, schema model.Schema, d model.Dialect) (model.QueryFile, error)
- func QueryFilePath(path string, schema model.Schema, d model.Dialect) (model.QueryFile, error)
- func ReadFileOrDir(path string) ([]byte, error)
- func Schema(content string, d model.Dialect) (model.Schema, error)
- func SchemaFile(path string, d model.Dialect) (model.Schema, error)
- func StripQueryCMarkers(sql string) string
- func ToCamel(s string) string
- func ToPascal(s string) string
- func ToSingular(s string) string
Constants ¶
View Source
const ( // HashtagDelimiter replaces #fragments in rewritten SQL before generation // splices fragment arguments back in. HashtagDelimiter = "__HASHTAG_DELIMITER__" )
Variables ¶
This section is empty.
Functions ¶
func FindTableByAlias ¶
FindTableByAlias returns a schema table name or registered alias.
func QueryFilePath ¶
QueryFilePath reads a queryc file or directory from disk and parses it.
func ReadFileOrDir ¶
ReadFileOrDir reads a file or directory recursively (only .sql files).
func SchemaFile ¶
SchemaFile reads and parses schema SQL from a file or directory.
func StripQueryCMarkers ¶
StripQueryCMarkers removes internal sentinel comments used by the feature layer to flag JSON serialised columns.
func ToSingular ¶
ToSingular applies common English plural to singular heuristics for type names.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.