package
0.0.0-20240109202931-c3698107e7fb
Repository: https://github.com/atomicleads/pggen.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

CreateCompositeType creates a struct to represent a Postgres composite type.
FindInputDeclarers finds all necessary Declarers for types that appear in the input parameters.
FindOutputDeclarers finds all necessary Declarers for types that appear in the output rows.
Generate emits generated Go files for each of the queryFiles.
NameArrayInitFunc returns the name for the function that creates an initialized pgtype.ValueTranscoder for the array type that's used to encode query parameters.
NameArrayRawFunc returns the function name that create the []interface{} array for the array type so that we can use it with a parent encoder function, like NameCompositeInitFunc, in the pgtype.Value Set call.
NameArrayTranscoderFunc returns the function name that creates a pgtype.ValueTranscoder for the array type that's used to decode rows returned by Postgres.
NameCompositeInitFunc returns the name of the function that creates an initialized pgtype.ValueTranscoder for the composite type used as a query parameters.
NameCompositeRawFunc returns the function name that creates the []interface{} array for the composite type so that we can use it with a parent encoder function, like NameCompositeInitFunc, in the pgtype.Value Set call.
NameCompositeTranscoderFunc returns the function name that creates a pgtype.ValueTranscoder for the composite type that's used to decode rows returned by Postgres.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTypeResolverDeclarer declares type resolver body code sometimes needed.
NewTypeResolverInitDeclarer declare type resolver init code always needed.

# Structs

ArrayInitDeclarer declares a new Go function that creates an *initialized* pgtype.ValueTranscoder for the Postgres type represented by the gotype.ArrayType.
ArrayRawDeclarer declares a new Go function that returns all fields as a generic array: []interface{}.
ArrayTranscoderDeclarer declares a new Go function that creates a pgtype.ValueTranscoder decoder for an array Postgres type.
CompositeInitDeclarer declares a new Go function that creates an initialized pgtype.ValueTranscoder for the Postgres type represented by the gotype.CompositeType.
CompositeRawDeclarer declares a new Go function that returns all fields of a composite type as a generic array: []interface{}.
CompositeTranscoderDeclarer declares a new Go function that creates a pgx decoder for the Postgres type represented by the gotype.CompositeType.
CompositeTypeDeclarer declares a new Go struct to represent a Postgres composite type.
ConstantDeclarer declares a new string literal.
Emitter writes a templated query file to a file.
EnumTranscoderDeclarer declares a new Go function that creates a pgx decoder for the Postgres type represented by the gotype.EnumType.
EnumTypeDeclarer declares a new string type and the const values to map to a Postgres enum.
GenerateOptions are options to control generated Go output.
ImportSet contains a set of imports required by one Go file.
No description provided by the author
TemplatedFile is the Go version of a SQL query file with all information needed to execute the codegen template.
TemplatedPackage is all templated files in a pggen invocation.
No description provided by the author
TemplatedQuery is a query with all information required to execute the codegen template.
Templater creates query file templates.
TemplaterOpts is options to control the template logic.
TypeResolver handles the mapping between Postgres and Go types.

# Interfaces

Declarer is implemented by any value that needs to declare types, data, or functions before use.

# Type aliases

DeclarerSet is a set of declarers, identified by the dedupe key.