Documentation ¶
Index ¶
- Constants
- func NewConflict() *conflict
- func NewDetailedExpression() *detailedExpression
- func NewExpression() *expression
- func PGSQL(isql ISQL) (query string, params []any, returning []any)
- func PostgresQueryParamHook(query string) string
- type Alter
- func (a *Alter) Action() *alterTableAction
- func (a *Alter) AllInTableSpace(name string) *Alter
- func (a *Alter) AttachDefaultPartition(name string) *Alter
- func (a *Alter) AttachPartition(name string) *partitionBound
- func (a *Alter) DetachPartition(name string) *Alter
- func (a *Alter) DetachPartitionConcurrently(name string) *Alter
- func (a *Alter) DetachPartitionFinalize(name string) *Alter
- func (a *Alter) IfExists() *Alter
- func (a *Alter) IsEmpty() bool
- func (a *Alter) Name(name string) *Alter
- func (a *Alter) Only() *Alter
- func (a *Alter) OwnedBy(role ...string) *Alter
- func (a *Alter) Rename(name string) *Alter
- func (a *Alter) RenameColumn(old, new string) *Alter
- func (a *Alter) RenameConstraint(old, new string) *Alter
- func (a *Alter) SQL() (query string, params []any, returning []any)
- func (a *Alter) SetSchema(name string) *Alter
- func (a *Alter) SetTableSpace(name string) *Alter
- func (a *Alter) SetTableSpaceNoWait(name string) *Alter
- func (a *Alter) String() string
- type Comment
- type Condition
- func (c *Condition) AddArgument(values ...interface{}) *Condition
- func (c *Condition) AddExpression(expression string, values ...interface{}) *Condition
- func (c *Condition) GetArguments() []interface{}
- func (c *Condition) IsEmpty() bool
- func (c *Condition) Merge(operator string, conditions ...*Condition) *Condition
- func (c *Condition) Replace(cond *Condition) *Condition
- func (c *Condition) String() string
- type Delete
- func (d *Delete) From(from string) *Delete
- func (d *Delete) GetGetArguments() []any
- func (d *Delete) IsEmpty() bool
- func (d *Delete) ResetFrom() *Delete
- func (d *Delete) ResetUsing() *Delete
- func (d *Delete) Returning() *expression
- func (d *Delete) SQL() (query string, params []any, returning []any)
- func (d *Delete) String() string
- func (d *Delete) Using(using ...string) *Delete
- func (d *Delete) Where() *Condition
- type ISQL
- type Index
- func (i *Index) AutoName() *Index
- func (i *Index) Concurrently() *Index
- func (i *Index) Expression() *expression
- func (i *Index) IfNotExists() *Index
- func (i *Index) Include(column ...string) *Index
- func (i *Index) IsEmpty() bool
- func (i *Index) Name(name string) *Index
- func (i *Index) NullsNotDistinct() *Index
- func (i *Index) SQL() (query string, params []any, returning []any)
- func (i *Index) String() string
- func (i *Index) Table(name string) *Index
- func (i *Index) TableSpace(space string) *Index
- func (i *Index) Unique() *Index
- func (i *Index) Using(using string) *Index
- func (i *Index) Where() *Condition
- func (i *Index) With(param ...string) *Index
- type Insert
- func (i *Insert) Columns() *expression
- func (i *Insert) Conflict() *conflict
- func (i *Insert) From(from ...string) *Insert
- func (i *Insert) GetArguments() []any
- func (i *Insert) Into(into string) *Insert
- func (i *Insert) IsEmpty() bool
- func (i *Insert) ResetConflict() *Insert
- func (i *Insert) ResetFrom() *Insert
- func (i *Insert) ResetInto() *Insert
- func (i *Insert) Returning() *expression
- func (i *Insert) SQL() (query string, params []any, returning []any)
- func (i *Insert) SetConflict(conflict conflict) *Insert
- func (i *Insert) String() string
- func (i *Insert) With() *with
- type Merge
- func (m *Merge) GetArguments() []any
- func (m *Merge) Into(target string) *Merge
- func (m *Merge) IntoOnly(target string) *Merge
- func (m *Merge) IsEmpty() bool
- func (m *Merge) SQL() (query string, params []any, returning []any)
- func (m *Merge) String() string
- func (m *Merge) Using(datasource string) *Merge
- func (m *Merge) UsingOnly(datasource string) *Merge
- func (m *Merge) When() *when
- func (m *Merge) With() *with
- type PeriodFilter
- type SQList
- type SearchString
- type Select
- func (q *Select) AddOrder(expression ...string) *Select
- func (q *Select) Columns() *expression
- func (q *Select) Except(s *Select) *Select
- func (q *Select) From(table ...string) *Select
- func (q *Select) GetArguments() []interface{}
- func (q *Select) GroupBy(fields ...string) *Select
- func (q *Select) Having() *Condition
- func (q *Select) Intersect(s *Select) *Select
- func (q *Select) Relate(relation ...string) *Select
- func (q *Select) ResetExcept() *Select
- func (q *Select) ResetFrom() *Select
- func (q *Select) ResetGroupBy() *Select
- func (q *Select) ResetIntersect() *Select
- func (q *Select) ResetOrder() *Select
- func (q *Select) ResetRelations() *Select
- func (q *Select) ResetUnion() *Select
- func (q *Select) SQL() (query string, params []any, returning []any)
- func (q *Select) SetPagination(limit int, offset int) *Select
- func (q *Select) String() string
- func (q *Select) Union(s *Select) *Select
- func (q *Select) Where() *Condition
- func (q *Select) With() *with
- type Sorting
- type Storage
- type Table
- func (t *Table) AddColumn(name string) *column
- func (t *Table) AddConstraint() *constraintTable
- func (t *Table) AddForeignKey(target string, columns ...string) *foreignKey
- func (t *Table) Definitions() *columnDefinitions
- func (t *Table) GetName() string
- func (t *Table) IfNotExists() *Table
- func (t *Table) Inherits() *expression
- func (t *Table) IsEmpty() bool
- func (t *Table) Name(name string) *Table
- func (t *Table) OfPartition() *ofPartition
- func (t *Table) OfType() *ofType
- func (t *Table) OnCommit(onCommit string) *Table
- func (t *Table) Partition() *partitionTable
- func (t *Table) SQL() (query string, params []any, returning []any)
- func (t *Table) Scope(scope string) *Table
- func (t *Table) String() string
- func (t *Table) TableSpace(space string) *Table
- func (t *Table) Temp() *Table
- func (t *Table) UnLogged() *Table
- func (t *Table) Using(using string) *Table
- func (t *Table) With(expr ...string) *detailedExpression
- func (t *Table) WithOutOIDS() *detailedExpression
- type TableModeler
- type TableModifier
- type Update
- func (u *Update) From(from ...string) *Update
- func (u *Update) GetArguments() []any
- func (u *Update) IsEmpty() bool
- func (u *Update) ResetFrom() *Update
- func (u *Update) ResetTable() *Update
- func (u *Update) Returning() *expression
- func (u *Update) SQL() (query string, params []any, returning []any)
- func (u *Update) Set() *expression
- func (u *Update) String() string
- func (u *Update) Table(table string) *Update
- func (u *Update) Where() *Condition
- func (u *Update) With() *with
Constants ¶
const ( // OwnerCurrentRole role OwnerCurrentRole = "CURRENT_ROLE" // OwnerCurrentUser user OwnerCurrentUser = "CURRENT_USER" // OwnerCurrentSession session OwnerCurrentSession = "SESSION_USER" )
const ( ConditionOperatorAnd = "AND" ConditionOperatorOr = "OR" ConditionOperatorXor = "XOR" )
const ( // ConflictActionNothing On conflict action do nothing ConflictActionNothing = "NOTHING" // ConflictActionUpdate On conflict action do update nothing ConflictActionUpdate = "UPDATE" )
const ( // ReferencesMatchFull MATCH FULL ReferencesMatchFull = "FULL" // ReferencesMatchPartial MATCH PARTIAL ReferencesMatchPartial = "PARTIAL" // ReferencesMatchSimple MATCH SIMPLE ReferencesMatchSimple = "SIMPLE" // CheckNoInherit NO INHERIT CheckNoInherit = "NO INHERIT" // GeneratedStored STORED GeneratedStored = "STORED" // GeneratedAlways ALWAYS GeneratedAlways = "ALWAYS" // GeneratedByDefault BY DEFAULT GeneratedByDefault = "BY DEFAULT" // Deferrable DEFERRABLE Deferrable = "DEFERRABLE" // NotDeferrable NOT DEFERRABLE NotDeferrable = "NOT DEFERRABLE" // InitiallyDeferred DEFERRED InitiallyDeferred = "DEFERRED" // InitiallyImmediate IMMEDIATE InitiallyImmediate = "IMMEDIATE" // ActionNoAction NO ACTION ActionNoAction = "NO ACTION" // ActionCascade CASCADE ActionCascade = "CASCADE" // ActionRestrict RESTRICT ActionRestrict = "RESTRICT" // ActionSetNull SET NULL ActionSetNull = "SET NULL" // ActionSetDefault SET DEFAULT ActionSetDefault = "SET DEFAULT" // LikeIncluding INCLUDING LikeIncluding = "INCLUDING" // LikeExcluding EXCLUDING LikeExcluding = "EXCLUDING" // LikeComments COMMENTS LikeComments = "COMMENTS" // LikeCompression COMPRESSION LikeCompression = "COMPRESSION" // LikeConstraints CONSTRAINTS LikeConstraints = "CONSTRAINTS" // LikeDefaults DEFAULTS LikeDefaults = "DEFAULTS" // LikeGenerated GENERATED LikeGenerated = "GENERATED" // LikeIdentity IDENTITY LikeIdentity = "IDENTITY" // LikeIndexes INDEXES LikeIndexes = "INDEXES" // LikeStatistics STATISTICS LikeStatistics = "STATISTICS" // LikeStorage STORAGE LikeStorage = "STORAGE" // LikeAll ALL LikeAll = "ALL" // WithWithoutOIDS WITHOUT OIDS WithWithoutOIDS = "WITHOUT OIDS" // PartitionByRange RANGE PartitionByRange = "RANGE" // PartitionByList LIST PartitionByList = "LIST" // PartitionByHash HASH PartitionByHash = "HASH" // PartitionBoundFromMin MINVALUE PartitionBoundFromMin = "MINVALUE" // PartitionBoundFromMax MAXVALUE PartitionBoundFromMax = "MAXVALUE" // PartitionBoundWithModulus MODULUS PartitionBoundWithModulus = "MODULUS" // PartitionBoundWithRemainder REMAINDER PartitionBoundWithRemainder = "REMAINDER" // PartitionOfWithOptions WITH OPTIONS PartitionOfWithOptions = "WITH OPTIONS" )
const EnumDelimiter = "#"
EnumDelimiter for join strings
Variables ¶
This section is empty.
Functions ¶
func NewDetailedExpression ¶ added in v0.5.0
func NewDetailedExpression() *detailedExpression
NewDetailedExpression init detailed expression
func PostgresQueryParamHook ¶ added in v0.7.0
PostgresQueryParamHook Position argument
Types ¶
type Alter ¶ added in v0.8.0
type Alter struct {
// contains filtered or unexported fields
}
ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ]
action [, ... ]
ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ]
RENAME [ COLUMN ] column_name TO new_column_name
ALTER TABLE [ IF EXISTS ] [ ONLY ] name [ * ]
RENAME CONSTRAINT constraint_name TO new_constraint_name
ALTER TABLE [ IF EXISTS ] name
RENAME TO new_name
ALTER TABLE [ IF EXISTS ] name
SET SCHEMA new_schema
ALTER TABLE ALL IN TABLESPACE name [ OWNED BY role_name [, ... ] ]
SET TABLESPACE new_tablespace [ NOWAIT ]
ALTER TABLE [ IF EXISTS ] name
ATTACH PARTITION partition_name { FOR VALUES partition_bound_spec | DEFAULT }
ALTER TABLE [ IF EXISTS ] name
DETACH PARTITION partition_name [ CONCURRENTLY | FINALIZE ]
and partition_bound_spec is:
IN ( partition_bound_expr [, ...] ) | FROM ( { partition_bound_expr | MINVALUE | MAXVALUE } [, ...] )
TO ( { partition_bound_expr | MINVALUE | MAXVALUE } [, ...] ) |
WITH ( MODULUS numeric_literal, REMAINDER numeric_literal )
and column_constraint is:
[ CONSTRAINT constraint_name ] { NOT NULL |
NULL | CHECK ( expression ) [ NO INHERIT ] | DEFAULT default_expr | GENERATED ALWAYS AS ( generation_expr ) STORED | GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ] | UNIQUE [ NULLS [ NOT ] DISTINCT ] index_parameters | PRIMARY KEY index_parameters | REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE referential_action ] [ ON UPDATE referential_action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
and table_constraint is:
[ CONSTRAINT constraint_name ] { CHECK ( expression ) [ NO INHERIT ] |
UNIQUE [ NULLS [ NOT ] DISTINCT ] ( column_name [, ... ] ) index_parameters | PRIMARY KEY ( column_name [, ... ] ) index_parameters | EXCLUDE [ USING index_method ] ( exclude_element WITH operator [, ... ] ) index_parameters [ WHERE ( predicate ) ] | FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE referential_action ] [ ON UPDATE referential_action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
and table_constraint_using_index is:
[ CONSTRAINT constraint_name ] { UNIQUE | PRIMARY KEY } USING INDEX index_name [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
index_parameters in UNIQUE, PRIMARY KEY, and EXCLUDE constraints are:
[ INCLUDE ( column_name [, ... ] ) ] [ WITH ( storage_parameter [= value] [, ... ] ) ] [ USING INDEX TABLESPACE tablespace_name ]
exclude_element in an EXCLUDE constraint is:
{ column_name | ( expression ) } [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
referential_action in a FOREIGN KEY/REFERENCES constraint is:
{ NO ACTION | RESTRICT | CASCADE | SET NULL [ ( column_name [, ... ] ) ] | SET DEFAULT [ ( column_name [, ... ] ) ] }
func AlterTable ¶ added in v0.8.0
AlterTable table constructor
func (*Alter) AllInTableSpace ¶ added in v0.8.0
AllInTableSpace name
func (*Alter) AttachDefaultPartition ¶ added in v0.8.0
AttachDefaultPartition name
func (*Alter) AttachPartition ¶ added in v0.8.0
AttachPartition name
func (*Alter) DetachPartition ¶ added in v0.8.0
DetachPartition name
func (*Alter) DetachPartitionConcurrently ¶ added in v0.8.0
DetachPartitionConcurrently name
func (*Alter) DetachPartitionFinalize ¶ added in v0.8.0
DetachPartitionFinalize name
func (*Alter) RenameColumn ¶ added in v0.8.0
RenameColumn rename column
func (*Alter) RenameConstraint ¶ added in v0.8.0
RenameConstraint rename constraint
func (*Alter) SetTableSpace ¶ added in v0.8.0
SetTableSpace name
func (*Alter) SetTableSpaceNoWait ¶ added in v0.8.0
SetTableSpaceNoWait name
type Comment ¶ added in v0.5.0
type Comment struct {
// contains filtered or unexported fields
}
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
Condition type
func NewSqlCondition ¶
NewSqlCondition init condition
func (*Condition) AddArgument ¶
AddArgument add argument
func (*Condition) AddExpression ¶
AddExpression add expression
func (*Condition) GetArguments ¶
func (c *Condition) GetArguments() []interface{}
GetArguments get arguments
type Delete ¶
type Delete struct {
// contains filtered or unexported fields
}
Delete query
func (*Delete) GetGetArguments ¶ added in v0.4.0
GetGetArguments get all values
func (*Delete) Returning ¶ added in v0.4.0
func (d *Delete) Returning() *expression
Returning Append returning expression
type ISQL ¶ added in v0.3.0
type ISQL interface { // SQL Get query as string with all params SQL() (query string, params []any, returning []any) }
ISQL each query should implement the interface
type Index ¶ added in v0.7.0
type Index struct {
// contains filtered or unexported fields
}
CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] name ] ON [ ONLY ] table_name [ USING method ]
( { column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [, ...] ) [ INCLUDE ( column_name [, ...] ) ] [ NULLS [ NOT ] DISTINCT ] [ WITH ( storage_parameter [= value] [, ... ] ) ] [ TABLESPACE tablespace_name ] [ WHERE predicate ]
func (*Index) Concurrently ¶ added in v0.7.0
Concurrently create index
func (*Index) Expression ¶ added in v0.7.0
func (i *Index) Expression() *expression
Expression index expression
func (*Index) IfNotExists ¶ added in v0.7.0
IfNotExists set if not exists
func (*Index) NullsNotDistinct ¶ added in v0.7.0
NullsNotDistinct set null not distinct
func (*Index) TableSpace ¶ added in v0.7.0
TableSpace set table space
type Insert ¶
type Insert struct {
// contains filtered or unexported fields
}
Insert query builder
func (*Insert) GetArguments ¶ added in v0.3.0
GetArguments get all arguments
func (*Insert) ResetConflict ¶ added in v0.3.4
ResetConflict reset conflict expression
func (*Insert) Returning ¶ added in v0.4.0
func (i *Insert) Returning() *expression
Returning Get returning expression
func (*Insert) SetConflict ¶ added in v0.3.4
SetConflict set conflict
type Merge ¶ added in v0.7.0
type Merge struct {
// contains filtered or unexported fields
}
[ WITH with_query [, ...] ] MERGE INTO [ ONLY ] target_table_name [ * ] [ [ AS ] target_alias ] USING data_source ON join_condition when_clause [...]
where data_source is:
{ [ ONLY ] source_table_name [ * ] | ( source_query ) } [ [ AS ] source_alias ]
and when_clause is:
{ WHEN MATCHED [ AND condition ] THEN { merge_update | merge_delete | DO NOTHING } |
WHEN NOT MATCHED [ AND condition ] THEN { merge_insert | DO NOTHING } }
and merge_insert is:
INSERT [( column_name [, ...] )] [ OVERRIDING { SYSTEM | USER } VALUE ] { VALUES ( { expression | DEFAULT } [, ...] ) | DEFAULT VALUES }
and merge_update is:
UPDATE SET { column_name = { expression | DEFAULT } |
( column_name [, ...] ) = ( { expression | DEFAULT } [, ...] ) } [, ...]
and merge_delete is:
DELETE
func (*Merge) GetArguments ¶ added in v0.7.0
GetArguments Get merge arguments
type PeriodFilter ¶ added in v0.7.2
type PeriodFilter struct { // begins from Start *time.Time `json:"start"` // ended when End *time.Time `json:"end"` }
PeriodFilter filter by datetime columns
func (*PeriodFilter) FieldCondition ¶ added in v0.7.2
func (p *PeriodFilter) FieldCondition(field string) *Condition
FieldCondition получить условие для фильтрации
func (*PeriodFilter) IsEmpty ¶ added in v0.7.2
func (p *PeriodFilter) IsEmpty() bool
IsEmpty if filter is empty
type SearchString ¶ added in v0.7.2
type SearchString string
SearchString search by text columns
func (SearchString) PrepareLikeValue ¶ added in v0.7.2
func (s SearchString) PrepareLikeValue(column string) *Condition
PrepareLikeValue prepare search like condition
type Select ¶
type Select struct { // is subquery. Put query in bracers SubQuery bool // contains filtered or unexported fields }
Select Query Builder struct Not a thread safety
func (*Select) ResetIntersect ¶
ResetIntersect reset intersect
func (*Select) SetPagination ¶
Set pagination
type Sorting ¶ added in v0.7.2
type Sorting []string
Sorting fields Example: ['createdAt:desc', 'name', 'qty:asc']
func (Sorting) Allowed ¶ added in v0.7.2
Allowed return all sorting columns according to allowed sort map
type Storage ¶ added in v0.8.0
type Storage string
const ( // StoragePlain PLAIN StoragePlain Storage = "PLAIN" // StorageExternal EXTERNAL StorageExternal Storage = "EXTERNAL" // StorageExtended EXTENDED StorageExtended Storage = "EXTENDED" // StorageMain MAIN StorageMain Storage = "MAIN" // StorageDefault DEFAULT StorageDefault Storage = "DEFAULT" )
type Table ¶ added in v0.5.0
type Table struct {
// contains filtered or unexported fields
}
Table create table query builder CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name ( [
{ column_name data_type [ COMPRESSION compression_method ] [ COLLATE collation ] [ column_constraint [ ... ] ] | table_constraint | LIKE source_table [ like_option ... ] } [, ... ]
] ) [ INHERITS ( parent_table [, ... ] ) ] [ PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [, ... ] ) ] [ USING method ] [ WITH ( storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_name ]
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name
OF type_name [ ( { column_name [ WITH OPTIONS ] [ column_constraint [ ... ] ] | table_constraint } [, ... ]
) ] [ PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [, ... ] ) ] [ USING method ] [ WITH ( storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_name ]
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name
PARTITION OF parent_table [ ( { column_name [ WITH OPTIONS ] [ column_constraint [ ... ] ] | table_constraint } [, ... ]
) ] { FOR VALUES partition_bound_spec | DEFAULT } [ PARTITION BY { RANGE | LIST | HASH } ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass ] [, ... ] ) ] [ USING method ] [ WITH ( storage_parameter [= value] [, ... ] ) | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_name ]
func (*Table) AddConstraint ¶ added in v0.5.0
func (t *Table) AddConstraint() *constraintTable
AddConstraint add constraint
func (*Table) AddForeignKey ¶ added in v0.5.0
AddForeignKey add foreign key
func (*Table) Definitions ¶ added in v0.6.1
func (t *Table) Definitions() *columnDefinitions
Definitions return column definitions
func (*Table) IfNotExists ¶ added in v0.5.0
IfNotExists Set to true
func (*Table) Inherits ¶ added in v0.5.0
func (t *Table) Inherits() *expression
Inherits inherit form tables
func (*Table) OfPartition ¶ added in v0.5.0
func (t *Table) OfPartition() *ofPartition
OfPartition get of partition definition
func (*Table) OfType ¶ added in v0.5.0
func (t *Table) OfType() *ofType
OfType get of type definition
func (*Table) Partition ¶ added in v0.5.0
func (t *Table) Partition() *partitionTable
Partition expression
func (*Table) TableSpace ¶ added in v0.6.0
TableSpace set table space
func (*Table) WithOutOIDS ¶ added in v0.5.0
func (t *Table) WithOutOIDS() *detailedExpression
WithOutOIDS expression
type TableModeler ¶ added in v0.6.1
type TableModeler []TableModifier
TableModeler list of TableModifier
func (TableModeler) Add ¶ added in v0.6.1
func (t TableModeler) Add(m ...TableModifier) TableModeler
Add define next table population method
func (TableModeler) Prepare ¶ added in v0.6.1
func (t TableModeler) Prepare(tb *Table)
Prepare table
type TableModifier ¶ added in v0.6.1
type TableModifier func(t *Table)
TableModifier func to modify table
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
Update query builder
func (*Update) GetArguments ¶ added in v0.4.3
GetArguments get all values
func (*Update) Returning ¶ added in v0.4.0
func (u *Update) Returning() *expression
Returning get returning expression
Source Files ¶
- alter_table.go
- alter_table_action.go
- alter_table_action_add.go
- alter_table_action_drop.go
- alter_table_action_set.go
- comment.go
- condition.go
- conflict.go
- delete.go
- detailed_expression.go
- dialect.go
- expression.go
- helper.go
- index.go
- insert.go
- merge.go
- ordered_expression.go
- select.go
- sql.go
- table.go
- table_column.go
- table_column_constraint.go
- table_column_definition.go
- table_column_index.go
- table_column_like.go
- table_column_references.go
- table_constraint.go
- table_constraint_using_index.go
- table_exclude.go
- table_exclude_element.go
- table_foreign_key.go
- table_index_parameters.go
- table_modeler.go
- table_of_definition.go
- table_of_partition.go
- table_partition.go
- update.go
- with.go