package
0.0.0-20240612174559-92eee8cd8dfc
Repository: https://github.com/monstercat/golib.git
Documentation: pkg.go.dev
# Functions
AddStringArrayCondition is a generic version of StatementBuilder.AddStringArrayCondition which helps convert the string array into a pq.StringArray.
ApplyConditions applies the Where to the provided Builder.
ApplyPaging applies the Limit and Offset to the provided Builder.
ApplySort applies the OrderBy to the provided Builder.
Get returns a single object with custom columns provided.
Iterate returns an iterator for retrieving multiple rows sequentially From the database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewStatementBuilder generates a query builder and initiates all required internal variables.
No description provided by the author
No description provided by the author
Select returns a list of objects with columns provided.
No description provided by the author
SubQueryOption wraps the string array condition in a subquery.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
ReplaceTablePlaceholderOption instructs the query builder to replace the TablePlaceholder occurrences in the SQL with a proper table, defined by the [From].
# Structs
ConditionOptionPreprocessParams are parameters that can be passed into the params, which are unrelated to conditions.
No description provided by the author
JoinMapCollection adds a join to the map.
MapCollection contains a map that implements Collection's Add and Size functions.
OptionConditionRegistry defines a container for items which may require preprocessing.
ReplaceTablePlaceholder is a squirrel.Sqlizer that adds a table to an existing SQL string.
No description provided by the author
SelectIterator is a way to retrieve an iterator for a select to use with scanning.
Selector provides three methods that can be used as defaults.
SliceCollection contains a slice that implements Collection's Add and Size functions.
SliceOptionConditionRegistry is syntactic sugar for collections that must be slices.
SqlizerSliceCollection is a slice of Sqlizer which implements Collection.
StatementBuilder helps with building select, update and delete queries.
UpdateBuilder generates an update method based on the encapsulated statement builder.
Updater provides some default insert/update/delete functionality.
# Interfaces
Collection is the data type that is passed into OptionConditionRegistry.
ConditionApplicable is an interface that defines a Where method which returns a specific type.
ConditionOption is an option that modifies a query string sqlizer for a condition.
ConditionOptionPreprocess denotes that the ConditionOption can be registered for preprocessing before it is applied to the query.
DBProvider is an interface that provides the database connection to the Selector.
PageApplicable is an interface that defines two methods - Limit and Offset which return a specific type.
Scanner is an object that contains a Scan method.
SortApplicable is an interface that defines an OrderBy method which returns a specific type.
# Type aliases
No description provided by the author
No description provided by the author
Preprocessor is a generic type for preprocessing queries.
QueryBuilderConditionOptionFunc converts a func to satisfy ConditionOption.
ScannerFunc is a definition for a function that performs scanning.
With implements the squirrel.Sqlizer interface for WITH as a prefix.