Documentation
¶
Index ¶
- Constants
- func Generate(inputFilePath string, pbDir string, parsedEntities []schema.Entity, ...) (string, error)
- func GenerateAccessFile(packageName string) string
- func GenerateConvertFile(packageName string, entities []schema.Entity, sqlDialect schema.SQLDialect) string
- func GoTypeFor(fieldType schema.FieldType) string
- func PackageNameOf(dir string) (string, error)
- type FileType
Constants ¶
View Source
const EntliteAccessFileName = "entlite_access.go"
EntliteAccessFileName exposes the connection handle sqlc keeps unexported. sqlc only rewrites its own files, so this one survives regeneration.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(inputFilePath string, pbDir string, parsedEntities []schema.Entity, entityImports map[string]internalParser.ImportInfo, sqlDialect schema.SQLDialect) (string, error)
func GenerateAccessFile ¶
GenerateAccessFile emits EntliteAccessFileName. The wrapper needs the handle to open a transaction around multi-row operations.
func GenerateConvertFile ¶
func PackageNameOf ¶
PackageNameOf reads the package clause of the first Go file in dir. sqlc takes the name from sqlc.yaml, so it cannot be guessed from the directory.
Types ¶
Click to show internal directories.
Click to hide internal directories.