package orm
Import Path
github.com/go-pg/pg/v10/orm (on go.dev )
Dependency Relation
imports 24 packages , and imported by 2 packages
Package-Level Type Names (total 72, in which 40 are exported)
/* sort exporteds by: alphabet | popularity */
type CreateTableQuery (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
opt *CreateTableOptions
q *Query
Methods (total 9, in which 6 are exported )
(*CreateTableQuery) AppendQuery (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*CreateTableQuery) AppendTemplate (b []byte ) ([]byte , error )
(*CreateTableQuery) Clone () QueryCommand
(*CreateTableQuery) Operation () QueryOp
(*CreateTableQuery) Query () *Query
(*CreateTableQuery) String () string
/* 3 unexporteds ... */ /* 3 unexporteds: */
(*CreateTableQuery) appendFKConstraint (fmter QueryFormatter , b []byte , rel *Relation ) []byte
(*CreateTableQuery) appendSQLType (b []byte , field *Field ) []byte
(*CreateTableQuery) appendTablespace (b []byte , tableSpace types .Safe ) []byte
Implements (at least 8, in which 5 are exported )
*CreateTableQuery : QueryAppender
*CreateTableQuery : QueryCommand
*CreateTableQuery : TemplateAppender
*CreateTableQuery : expvar.Var
*CreateTableQuery : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*CreateTableQuery : github.com/aws/smithy-go/middleware.stringer
*CreateTableQuery : context.stringer
*CreateTableQuery : runtime.stringer
As Outputs Of (at least one exported )
func NewCreateTableQuery (q *Query , opt *CreateTableOptions ) *CreateTableQuery
type DB (interface)
DB is a common interface for pg.DB and pg.Tx types.
Methods (total 14, all are exported )
( DB) Context () context .Context
( DB) CopyFrom (r io .Reader , query interface{}, params ...interface{}) (Result , error )
( DB) CopyTo (w io .Writer , query interface{}, params ...interface{}) (Result , error )
( DB) Exec (query interface{}, params ...interface{}) (Result , error )
( DB) ExecContext (c context .Context , query interface{}, params ...interface{}) (Result , error )
( DB) ExecOne (query interface{}, params ...interface{}) (Result , error )
( DB) ExecOneContext (c context .Context , query interface{}, params ...interface{}) (Result , error )
( DB) Formatter () QueryFormatter
( DB) Model (model ...interface{}) *Query
( DB) ModelContext (c context .Context , model ...interface{}) *Query
( DB) Query (model, query interface{}, params ...interface{}) (Result , error )
( DB) QueryContext (c context .Context , model, query interface{}, params ...interface{}) (Result , error )
( DB) QueryOne (model, query interface{}, params ...interface{}) (Result , error )
( DB) QueryOneContext (c context .Context , model, query interface{}, params ...interface{}) (Result , error )
Implemented By (at least 3, all are exported )
*github.com/go-pg/pg/v10.Conn
*github.com/go-pg/pg/v10.DB
*github.com/go-pg/pg/v10.Tx
As Inputs Of (at least 3, all are exported )
func NewQuery (db DB , model ...interface{}) *Query
func NewQueryContext (ctx context .Context , db DB , model ...interface{}) *Query
func (*Query ).DB (db DB ) *Query
type Field (struct)
Fields (total 15, in which 11 are exported )
Column types .Safe
// escaped SQL name, e.g. "id"
Default types .Safe
Field reflect .StructField
GoName string
// struct field name, e.g. Id
Index []int
OnDelete string
OnUpdate string
SQLName string
// SQL name, .e.g. id
SQLType string
Type reflect .Type
UserSQLType string
/* 4 unexporteds ... */ /* 4 unexporteds: */
append types .AppenderFunc
flags uint8
isZero zerochecker .Func
scan types .ScannerFunc
Methods (total 9, in which 6 are exported )
(*Field) AppendValue (b []byte , strct reflect .Value , quote int ) []byte
(*Field) Clone () *Field
(*Field) HasZeroValue (strct reflect .Value ) bool
(*Field) NullZero () bool
(*Field) ScanValue (strct reflect .Value , rd types .Reader , n int ) error
(*Field) Value (strct reflect .Value ) reflect .Value
/* 3 unexporteds ... */ /* 3 unexporteds: */
(*Field) hasFlag (flag uint8 ) bool
(*Field) hasZeroValue (v reflect .Value , index []int ) bool
(*Field) setFlag (flag uint8 )
As Outputs Of (at least 9, in which 2 are exported )
func (*Field).Clone () *Field
func (*Table ).GetField (name string ) (*Field , error )
/* 7+ unexporteds ... */ /* 7+ unexporteds: */
func foreignKeys (base, join *Table , fk string , tryFK bool ) []*Field
func removeField (fields []*Field , field *Field ) []*Field
func (*Query )._getFields (omitPKs bool ) ([]*Field , error )
func (*Query ).getDataFields () ([]*Field , error )
func (*Query ).getFields () ([]*Field , error )
func (*Table ).getField (name string ) *Field
func (*Table ).newField (f reflect .StructField , index []int ) *Field
As Inputs Of (at least 38, in which 2 are exported )
func (*Table ).AddField (field *Field )
func (*Table ).RemoveField (field *Field )
/* 36+ unexporteds ... */ /* 36+ unexporteds: */
func appendChildValues (b []byte , v reflect .Value , index []int , fields []*Field ) []byte
func appendColumnAndSliceValue (fmter QueryFormatter , b []byte , slice reflect .Value , alias types .Safe , fields []*Field ) []byte
func appendColumnAndValue (fmter QueryFormatter , b []byte , v reflect .Value , alias types .Safe , fields []*Field ) []byte
func appendColumns (b []byte , table types .Safe , fields []*Field ) []byte
func appendPKConstraint (b []byte , pks []*Field ) []byte
func appendReturningFields (b []byte , fields []*Field ) []byte
func appendUnique (b []byte , fields []*Field ) []byte
func appendWhereColumnAndColumn (b []byte , alias types .Safe , fields []*Field ) []byte
func dstValues (model TableModel , fields []*Field ) map[string ][]reflect .Value
func fieldSQLType (field *Field , pgTag *tagparser .Tag ) string
func modelID (b []byte , v reflect .Value , fields []*Field ) []byte
func onDelete (fks []*Field ) string
func onUpdate (fks []*Field ) string
func removeField (fields []*Field , field *Field ) []*Field
func removeField (fields []*Field , field *Field ) []*Field
func (*CreateTableQuery ).appendSQLType (b []byte , field *Field ) []byte
func (*InsertQuery ).addReturningField (field *Field )
func (*InsertQuery ).appendColumns (b []byte , fields []*Field ) []byte
func (*InsertQuery ).appendSetExcluded (b []byte , fields []*Field ) []byte
func (*InsertQuery ).appendSliceValues (fmter QueryFormatter , b []byte , fields []*Field , slice reflect .Value ) (_ []byte , err error )
func (*InsertQuery ).appendValues (fmter QueryFormatter , b []byte , fields []*Field , strct reflect .Value ) (_ []byte , err error )
func (*Table ).inlineFields (strct *Field , path map[reflect .Type ]struct{})
func (*Table ).mustBelongsToRelation (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).mustHasManyRelation (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).mustHasOneRelation (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).mustM2MRelation (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryBelongsToOne (joinTable *Table , field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryHasManyRelation (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryHasOne (joinTable *Table , field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryM2MRelation (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryRelation (field *Field ) bool
func (*Table ).tryRelationSlice (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryRelationStruct (field *Field , pgTag *tagparser .Tag ) bool
func (*Table ).tryRelationType (field *Field , rel string , pgTag *tagparser .Tag ) bool
func (*UpdateQuery ).appendSliceValues (fmter QueryFormatter , b []byte , fields []*Field , slice reflect .Value ) (_ []byte , err error )
func (*UpdateQuery ).appendValues (fmter QueryFormatter , b []byte , fields []*Field , strct reflect .Value ) (_ []byte , err error )
type InsertQuery (struct)
Fields (total 3, none are exported )
/* 3 unexporteds ... */ /* 3 unexporteds: */
placeholder bool
q *Query
returningFields []*Field
Methods (total 13, in which 6 are exported )
(*InsertQuery) AppendQuery (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*InsertQuery) AppendTemplate (b []byte ) ([]byte , error )
(*InsertQuery) Clone () QueryCommand
(*InsertQuery) Operation () QueryOp
(*InsertQuery) Query () *Query
(*InsertQuery) String () string
/* 7 unexporteds ... */ /* 7 unexporteds: */
(*InsertQuery) addReturningField (field *Field )
(*InsertQuery) appendColumns (b []byte , fields []*Field ) []byte
(*InsertQuery) appendColumnsValues (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*InsertQuery) appendMapColumnsValues (b []byte , m map[string ]interface{}) []byte
(*InsertQuery) appendSetExcluded (b []byte , fields []*Field ) []byte
(*InsertQuery) appendSliceValues (fmter QueryFormatter , b []byte , fields []*Field , slice reflect .Value ) (_ []byte , err error )
(*InsertQuery) appendValues (fmter QueryFormatter , b []byte , fields []*Field , strct reflect .Value ) (_ []byte , err error )
Implements (at least 8, in which 5 are exported )
*InsertQuery : QueryAppender
*InsertQuery : QueryCommand
*InsertQuery : TemplateAppender
*InsertQuery : expvar.Var
*InsertQuery : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*InsertQuery : github.com/aws/smithy-go/middleware.stringer
*InsertQuery : context.stringer
*InsertQuery : runtime.stringer
As Outputs Of (at least one exported )
func NewInsertQuery (q *Query ) *InsertQuery
type Model (interface)
Methods (total 11, all are exported )
( Model) AddColumnScanner (ColumnScanner ) error
AddColumnScanner adds the ColumnScanner to the model.
( Model) AfterDelete (context .Context ) error
( Model) AfterInsert (context .Context ) error
( Model) AfterScan (context .Context ) error
( Model) AfterSelect (context .Context ) error
( Model) AfterUpdate (context .Context ) error
( Model) BeforeDelete (context .Context ) (context .Context , error )
( Model) BeforeInsert (context .Context ) (context .Context , error )
( Model) BeforeUpdate (context .Context ) (context .Context , error )
( Model) Init () error
Init is responsible to initialize/reset model state.
It is called only once no matter how many rows were returned.
( Model) NextColumnScanner () ColumnScanner
NextColumnScanner returns a ColumnScanner that is used to scan columns
from the current row. It is called once for every row.
Implemented By (at least 13, in which 2 are exported )
Discard
TableModel (interface)
/* 11+ unexporteds ... */ /* 11+ unexporteds: */
*funcModel
*m2mModel
*manyModel
*mapModel
*mapSliceModel
modelWithHookStubs
scanReflectValuesModel
scanValuesModel
*sliceModel
*sliceTableModel
*structTableModel
Implements (at least 9, all are exported )
Model : AfterDeleteHook
Model : AfterInsertHook
Model : AfterScanHook
Model : AfterSelectHook
Model : AfterUpdateHook
Model : BeforeDeleteHook
Model : BeforeInsertHook
Model : BeforeUpdateHook
Model : HooklessModel
As Outputs Of (at least 8, in which 3 are exported )
func NewModel (value interface{}) (Model , error )
func Result .Model () Model
func github.com/go-pg/pg/v10.Result .Model () Model
/* 5+ unexporteds ... */ /* 5+ unexporteds: */
func newModel (value interface{}, scan bool ) (Model , error )
func newModelWithHookStubs (m HooklessModel ) Model
func newScanModel (values []interface{}) (Model , error )
func (*Query ).newModel (values []interface{}) (Model , error )
func github.com/go-pg/pg/v10.newModel (mod interface{}) (Model , error )
As Inputs Of (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func (*Query ).query (ctx context .Context , model Model , query interface{}) (Result , error )
func (*Query ).returningQuery (c context .Context , model Model , query interface{}) (Result , error )
type Query (struct)
Fields (total 26, none are exported )
/* 26 unexporteds ... */ /* 26 unexporteds: */
columns []QueryAppender
ctx context .Context
db DB
distinctOn []*SafeQueryAppender
extraValues []*columnValue
flags queryFlag
group []QueryAppender
having []*SafeQueryAppender
joinAppendOn func(app *condAppender )
joins []QueryAppender
limit int
model Model
modelValues map[string ]*SafeQueryAppender
offset int
onConflict *SafeQueryAppender
order []QueryAppender
returning []*SafeQueryAppender
selFor *SafeQueryAppender
set []QueryAppender
stickyErr error
tableModel TableModel
tables []QueryAppender
union []*union
updWhere []queryWithSepAppender
where []queryWithSepAppender
with []withQuery
Methods (total 122, in which 79 are exported )
(*Query) AllWithDeleted () *Query
AllWithDeleted changes query to return all rows including soft deleted ones.
(*Query) AppendQuery (fmter QueryFormatter , b []byte ) ([]byte , error )
(*Query) Apply (fn func(*Query ) (*Query , error )) *Query
Apply calls the fn passing the Query as an argument.
(*Query) Clone () *Query
Clone clones the Query.
(*Query) Column (columns ...string ) *Query
Column adds a column to the Query quoting it according to PostgreSQL rules.
Does not expand params like ?TableAlias etc.
ColumnExpr can be used to bypass quoting restriction or for params expansion.
Column name can be:
- column_name,
- table_alias.column_name,
- table_alias.*.
(*Query) ColumnExpr (expr string , params ...interface{}) *Query
ColumnExpr adds column expression to the Query.
(*Query) Context (c context .Context ) *Query
(*Query) CopyFrom (r io .Reader , query interface{}, params ...interface{}) (Result , error )
CopyFrom is an alias from DB.CopyFrom.
(*Query) CopyTo (w io .Writer , query interface{}, params ...interface{}) (Result , error )
CopyTo is an alias from DB.CopyTo.
(*Query) Count () (int , error )
Count returns number of rows matching the query using count aggregate function.
(*Query) CountEstimate (threshold int ) (int , error )
CountEstimate uses EXPLAIN to get estimated number of rows returned the query.
If that number is bigger than the threshold it returns the estimation.
Otherwise it executes another query using count aggregate function and
returns the result.
Based on https://wiki.postgresql.org/wiki/Count_estimate
(*Query) CreateComposite (opt *CreateCompositeOptions ) error
(*Query) CreateTable (opt *CreateTableOptions ) error
(*Query) DB (db DB ) *Query
(*Query) Delete (values ...interface{}) (Result , error )
Delete deletes the model. When model has deleted_at column the row
is soft deleted instead.
(*Query) Deleted () *Query
Deleted adds `WHERE deleted_at IS NOT NULL` clause for soft deleted models.
(*Query) Distinct () *Query
(*Query) DistinctOn (expr string , params ...interface{}) *Query
(*Query) DropComposite (opt *DropCompositeOptions ) error
(*Query) DropTable (opt *DropTableOptions ) error
(*Query) Except (other *Query ) *Query
(*Query) ExceptAll (other *Query ) *Query
(*Query) ExcludeColumn (columns ...string ) *Query
ExcludeColumn excludes a column from the list of to be selected columns.
(*Query) Exec (query interface{}, params ...interface{}) (Result , error )
Exec is an alias for DB.Exec.
(*Query) ExecOne (query interface{}, params ...interface{}) (Result , error )
ExecOne is an alias for DB.ExecOne.
(*Query) Exists () (bool , error )
Exists returns true or false depending if there are any rows matching the query.
(*Query) First () error
First sorts rows by primary key and selects the first row.
It is a shortcut for:
q.OrderExpr("id ASC").Limit(1)
(*Query) For (s string , params ...interface{}) *Query
(*Query) ForEach (fn interface{}) error
ForEach calls the function for each row returned by the query
without loading all rows into the memory.
Function can accept a struct, a pointer to a struct, an orm.Model,
or values for the columns in a row. Function must return an error.
(*Query) ForceDelete (values ...interface{}) (Result , error )
Delete forces delete of the model with deleted_at column.
(*Query) Group (columns ...string ) *Query
(*Query) GroupExpr (group string , params ...interface{}) *Query
(*Query) Having (having string , params ...interface{}) *Query
(*Query) Insert (values ...interface{}) (Result , error )
Insert inserts the model.
(*Query) Intersect (other *Query ) *Query
(*Query) IntersectAll (other *Query ) *Query
(*Query) Join (join string , params ...interface{}) *Query
(*Query) JoinOn (condition string , params ...interface{}) *Query
JoinOn appends join condition to the last join.
(*Query) JoinOnOr (condition string , params ...interface{}) *Query
(*Query) Last () error
Last sorts rows by primary key and selects the last row.
It is a shortcut for:
q.OrderExpr("id DESC").Limit(1)
(*Query) Limit (n int ) *Query
(*Query) Model (model ...interface{}) *Query
(*Query) New () *Query
New returns new zero Query bound to the current db.
(*Query) Offset (n int ) *Query
(*Query) OnConflict (s string , params ...interface{}) *Query
(*Query) Order (orders ...string ) *Query
Order adds sort order to the Query quoting column name. Does not expand params like ?TableAlias etc.
OrderExpr can be used to bypass quoting restriction or for params expansion.
(*Query) OrderExpr (order string , params ...interface{}) *Query
Order adds sort order to the Query.
(*Query) Query (model, query interface{}, params ...interface{}) (Result , error )
Query is an alias for DB.Query.
(*Query) QueryOne (model, query interface{}, params ...interface{}) (Result , error )
QueryOne is an alias for DB.QueryOne.
(*Query) Relation (name string , apply ...func(*Query ) (*Query , error )) *Query
Relation adds a relation to the query. Relation name can be:
- RelationName to select all columns,
- RelationName.column_name,
- RelationName._ to join relation without selecting relation columns.
(*Query) Returning (s string , params ...interface{}) *Query
Returning adds a RETURNING clause to the query.
`Returning("NULL")` can be used to suppress default returning clause
generated by go-pg for INSERT queries to get values for null columns.
(*Query) Select (values ...interface{}) error
Select selects the model.
(*Query) SelectAndCount (values ...interface{}) (count int , firstErr error )
SelectAndCount runs Select and Count in two goroutines,
waits for them to finish and returns the result. If query limit is -1
it does not select any data and only counts the results.
(*Query) SelectAndCountEstimate (threshold int , values ...interface{}) (count int , firstErr error )
SelectAndCountEstimate runs Select and CountEstimate in two goroutines,
waits for them to finish and returns the result. If query limit is -1
it does not select any data and only counts the results.
(*Query) SelectOrInsert (values ...interface{}) (inserted bool , _ error )
SelectOrInsert selects the model inserting one if it does not exist.
It returns true when model was inserted.
(*Query) Set (set string , params ...interface{}) *Query
(*Query) Table (tables ...string ) *Query
(*Query) TableExpr (expr string , params ...interface{}) *Query
(*Query) TableModel () TableModel
(*Query) Union (other *Query ) *Query
(*Query) UnionAll (other *Query ) *Query
(*Query) Update (scan ...interface{}) (Result , error )
Update updates the model.
(*Query) UpdateNotZero (scan ...interface{}) (Result , error )
Update updates the model omitting fields with zero values such as:
- empty string,
- 0,
- zero time,
- empty map or slice,
- byte array with all zeroes,
- nil ptr,
- types with method `IsZero() == true`.
(*Query) Value (column string , value string , params ...interface{}) *Query
Value overwrites model value for the column in INSERT and UPDATE queries.
(*Query) Where (condition string , params ...interface{}) *Query
(*Query) WhereGroup (fn func(*Query ) (*Query , error )) *Query
WhereGroup encloses conditions added in the function in parentheses.
q.Where("TRUE").
WhereGroup(func(q *pg.Query) (*pg.Query, error) {
q = q.WhereOr("FALSE").WhereOr("TRUE").
return q, nil
})
generates
WHERE TRUE AND (FALSE OR TRUE)
(*Query) WhereIn (where string , slice interface{}) *Query
WhereIn is a shortcut for Where and pg.In.
(*Query) WhereInMulti (where string , values ...interface{}) *Query
WhereInMulti is a shortcut for Where and pg.InMulti.
(*Query) WhereInOr (where string , slice interface{}) *Query
WhereInOr is a shortcut for WhereOr and pg.In.
(*Query) WhereNotGroup (fn func(*Query ) (*Query , error )) *Query
WhereGroup encloses conditions added in the function in parentheses.
q.Where("TRUE").
WhereNotGroup(func(q *pg.Query) (*pg.Query, error) {
q = q.WhereOr("FALSE").WhereOr("TRUE").
return q, nil
})
generates
WHERE TRUE AND NOT (FALSE OR TRUE)
(*Query) WhereOr (condition string , params ...interface{}) *Query
(*Query) WhereOrGroup (fn func(*Query ) (*Query , error )) *Query
WhereOrGroup encloses conditions added in the function in parentheses.
q.Where("TRUE").
WhereOrGroup(func(q *pg.Query) (*pg.Query, error) {
q = q.Where("FALSE").Where("TRUE").
return q, nil
})
generates
WHERE TRUE OR (FALSE AND TRUE)
(*Query) WhereOrNotGroup (fn func(*Query ) (*Query , error )) *Query
WhereOrGroup encloses conditions added in the function in parentheses.
q.Where("TRUE").
WhereOrGroup(func(q *pg.Query) (*pg.Query, error) {
q = q.Where("FALSE").Where("TRUE").
return q, nil
})
generates
WHERE TRUE OR NOT (FALSE AND TRUE)
(*Query) WherePK () *Query
WherePK adds condition based on the model primary keys.
Usually it is the same as:
Where("id = ?id")
(*Query) With (name string , subq *Query ) *Query
With adds subq as common table expression with the given name.
(*Query) WithDelete (name string , subq *Query ) *Query
(*Query) WithInsert (name string , subq *Query ) *Query
(*Query) WithUpdate (name string , subq *Query ) *Query
(*Query) WrapWith (name string ) *Query
WrapWith creates new Query and adds to it current query as
common table expression with the given name.
/* 43 unexporteds ... */ /* 43 unexporteds: */
(*Query) _appendWhere (fmter QueryFormatter , b []byte , where []queryWithSepAppender ) (_ []byte , err error )
(*Query) _forEachHasOneJoin (fn func(*join ) error , joins []join ) error
(*Query) _getFields (omitPKs bool ) ([]*Field , error )
(*Query) _with (name string , subq QueryAppender ) *Query
(*Query) addUnion (expr string , other *Query ) *Query
(*Query) addWhere (f queryWithSepAppender )
(*Query) appendColumns (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) appendFirstTable (fmter QueryFormatter , b []byte ) ([]byte , error )
(*Query) appendFirstTableWithAlias (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) appendOtherTables (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) appendReturning (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) appendSet (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) appendSoftDelete (b []byte ) []byte
(*Query) appendUpdWhere (fmter QueryFormatter , b []byte ) ([]byte , error )
(*Query) appendWhere (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) appendWith (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*Query) countSelectQuery (column string ) *SelectQuery
(*Query) createCountEstimateFunc () error
(*Query) err (err error ) *Query
(*Query) excludeColumn (column string ) bool
(*Query) forEachHasOneJoin (fn func(*join ) error ) error
(*Query) getDataFields () ([]*Field , error )
(*Query) getFields () ([]*Field , error )
(*Query) hasExplicitTableModel () bool
(*Query) hasFlag (flag queryFlag ) bool
(*Query) hasMultiTables () bool
(*Query) hasReturning () bool
(*Query) hasTableModel () bool
(*Query) hasTables () bool
(*Query) isSliceModelWithData () bool
(*Query) isSoftDelete () bool
(*Query) modelHasTableAlias () bool
(*Query) modelHasTableName () bool
(*Query) mustAppendWhere (fmter QueryFormatter , b []byte ) ([]byte , error )
(*Query) newModel (values []interface{}) (Model , error )
(*Query) onConflictDoUpdate () bool
(*Query) query (ctx context .Context , model Model , query interface{}) (Result , error )
(*Query) returningQuery (c context .Context , model Model , query interface{}) (Result , error )
(*Query) selectJoins (joins []join ) error
(*Query) update (values []interface{}, omitZero bool ) (Result , error )
(*Query) whereGroup (conj string , fn func(*Query ) (*Query , error )) *Query
(*Query) withFlag (flag queryFlag ) *Query
(*Query) withoutFlag (flag queryFlag ) *Query
Implements (at least one exported )
*Query : QueryAppender
As Outputs Of (at least 78, in which 72 are exported )
func NewQuery (db DB , model ...interface{}) *Query
func NewQueryContext (ctx context .Context , db DB , model ...interface{}) *Query
func (*CreateCompositeQuery ).Query () *Query
func (*CreateTableQuery ).Query () *Query
func DB .Model (model ...interface{}) *Query
func DB .ModelContext (c context .Context , model ...interface{}) *Query
func (*DeleteQuery ).Query () *Query
func (*DropCompositeQuery ).Query () *Query
func (*DropTableQuery ).Query () *Query
func (*InsertQuery ).Query () *Query
func (*Query).AllWithDeleted () *Query
func (*Query).Apply (fn func(*Query ) (*Query , error )) *Query
func (*Query).Clone () *Query
func (*Query).Column (columns ...string ) *Query
func (*Query).ColumnExpr (expr string , params ...interface{}) *Query
func (*Query).Context (c context .Context ) *Query
func (*Query).DB (db DB ) *Query
func (*Query).Deleted () *Query
func (*Query).Distinct () *Query
func (*Query).DistinctOn (expr string , params ...interface{}) *Query
func (*Query).Except (other *Query ) *Query
func (*Query).ExceptAll (other *Query ) *Query
func (*Query).ExcludeColumn (columns ...string ) *Query
func (*Query).For (s string , params ...interface{}) *Query
func (*Query).Group (columns ...string ) *Query
func (*Query).GroupExpr (group string , params ...interface{}) *Query
func (*Query).Having (having string , params ...interface{}) *Query
func (*Query).Intersect (other *Query ) *Query
func (*Query).IntersectAll (other *Query ) *Query
func (*Query).Join (join string , params ...interface{}) *Query
func (*Query).JoinOn (condition string , params ...interface{}) *Query
func (*Query).JoinOnOr (condition string , params ...interface{}) *Query
func (*Query).Limit (n int ) *Query
func (*Query).Model (model ...interface{}) *Query
func (*Query).New () *Query
func (*Query).Offset (n int ) *Query
func (*Query).OnConflict (s string , params ...interface{}) *Query
func (*Query).Order (orders ...string ) *Query
func (*Query).OrderExpr (order string , params ...interface{}) *Query
func (*Query).Relation (name string , apply ...func(*Query ) (*Query , error )) *Query
func (*Query).Returning (s string , params ...interface{}) *Query
func (*Query).Set (set string , params ...interface{}) *Query
func (*Query).Table (tables ...string ) *Query
func (*Query).TableExpr (expr string , params ...interface{}) *Query
func (*Query).Union (other *Query ) *Query
func (*Query).UnionAll (other *Query ) *Query
func (*Query).Value (column string , value string , params ...interface{}) *Query
func (*Query).Where (condition string , params ...interface{}) *Query
func (*Query).WhereGroup (fn func(*Query ) (*Query , error )) *Query
func (*Query).WhereIn (where string , slice interface{}) *Query
func (*Query).WhereInMulti (where string , values ...interface{}) *Query
func (*Query).WhereInOr (where string , slice interface{}) *Query
func (*Query).WhereNotGroup (fn func(*Query ) (*Query , error )) *Query
func (*Query).WhereOr (condition string , params ...interface{}) *Query
func (*Query).WhereOrGroup (fn func(*Query ) (*Query , error )) *Query
func (*Query).WhereOrNotGroup (fn func(*Query ) (*Query , error )) *Query
func (*Query).WherePK () *Query
func (*Query).With (name string , subq *Query ) *Query
func (*Query).WithDelete (name string , subq *Query ) *Query
func (*Query).WithInsert (name string , subq *Query ) *Query
func (*Query).WithUpdate (name string , subq *Query ) *Query
func (*Query).WrapWith (name string ) *Query
func QueryCommand .Query () *Query
func (*SelectQuery ).Query () *Query
func (*UpdateQuery ).Query () *Query
func github.com/go-pg/pg/v10.Model (model ...interface{}) *pg .Query
func github.com/go-pg/pg/v10.ModelContext (c context .Context , model ...interface{}) *pg .Query
func github.com/go-pg/pg/v10.DBI .Model (model ...interface{}) *pg .Query
func github.com/go-pg/pg/v10.DBI .ModelContext (c context .Context , model ...interface{}) *pg .Query
func github.com/go-pg/pg/v10.(*Tx ).Model (model ...interface{}) *pg .Query
func github.com/go-pg/pg/v10.(*Tx ).ModelContext (c context .Context , model ...interface{}) *pg .Query
func github.com/go-pg/migrations/v8.DB .Model (model ...interface{}) *Query
/* 6+ unexporteds ... */ /* 6+ unexporteds: */
func (*Query)._with (name string , subq QueryAppender ) *Query
func (*Query).addUnion (expr string , other *Query ) *Query
func (*Query).err (err error ) *Query
func (*Query).whereGroup (conj string , fn func(*Query ) (*Query , error )) *Query
func (*Query).withFlag (flag queryFlag ) *Query
func (*Query).withoutFlag (flag queryFlag ) *Query
As Inputs Of (at least 19, in which 18 are exported )
func NewCreateCompositeQuery (q *Query , opt *CreateCompositeOptions ) *CreateCompositeQuery
func NewCreateTableQuery (q *Query , opt *CreateTableOptions ) *CreateTableQuery
func NewDeleteQuery (q *Query ) *DeleteQuery
func NewDropCompositeQuery (q *Query , opt *DropCompositeOptions ) *DropCompositeQuery
func NewDropTableQuery (q *Query , opt *DropTableOptions ) *DropTableQuery
func NewInsertQuery (q *Query ) *InsertQuery
func NewSelectQuery (q *Query ) *SelectQuery
func NewUpdateQuery (q *Query , omitZero bool ) *UpdateQuery
func (*Query).Except (other *Query ) *Query
func (*Query).ExceptAll (other *Query ) *Query
func (*Query).Intersect (other *Query ) *Query
func (*Query).IntersectAll (other *Query ) *Query
func (*Query).Union (other *Query ) *Query
func (*Query).UnionAll (other *Query ) *Query
func (*Query).With (name string , subq *Query ) *Query
func (*Query).WithDelete (name string , subq *Query ) *Query
func (*Query).WithInsert (name string , subq *Query ) *Query
func (*Query).WithUpdate (name string , subq *Query ) *Query
/* at least one unexported ... */ /* at least one unexported: */
func (*Query).addUnion (expr string , other *Query ) *Query
type Relation (struct)
Fields (total 10, all are exported )
BaseFKs []*Field
Field *Field
JoinFKs []*Field
JoinTable *Table
M2MBaseFKs []string
M2MJoinFKs []string
M2MTableAlias types .Safe
M2MTableName types .Safe
Polymorphic *Field
Type int
Methods (only one, which is exported )
(*Relation) String () string
Implements (at least 5, in which 2 are exported )
*Relation : expvar.Var
*Relation : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*Relation : github.com/aws/smithy-go/middleware.stringer
*Relation : context.stringer
*Relation : runtime.stringer
As Outputs Of (at least one exported )
func TableModel .Relation () *Relation
As Inputs Of (at least 3, none are exported )
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func newTableModelIndex (typ reflect .Type , root reflect .Value , index []int , rel *Relation ) (TableModel , error )
func (*CreateTableQuery ).appendFKConstraint (fmter QueryFormatter , b []byte , rel *Relation ) []byte
func (*Table ).addRelation (rel *Relation )
type Result (interface)
Result summarizes an executed SQL command.
Methods (total 3, all are exported )
( Result) Model () Model
( Result) RowsAffected () int
RowsAffected returns the number of rows affected by SELECT, INSERT, UPDATE,
or DELETE queries. It returns -1 if query can't possibly affect any rows,
e.g. in case of CREATE or SHOW queries.
( Result) RowsReturned () int
RowsReturned returns the number of rows returned by the query.
Implemented By (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
*github.com/go-pg/pg/v10.result
As Outputs Of (at least 68, in which 55 are exported )
func DB .CopyFrom (r io .Reader , query interface{}, params ...interface{}) (Result , error )
func DB .CopyTo (w io .Writer , query interface{}, params ...interface{}) (Result , error )
func DB .Exec (query interface{}, params ...interface{}) (Result , error )
func DB .ExecContext (c context .Context , query interface{}, params ...interface{}) (Result , error )
func DB .ExecOne (query interface{}, params ...interface{}) (Result , error )
func DB .ExecOneContext (c context .Context , query interface{}, params ...interface{}) (Result , error )
func DB .Query (model, query interface{}, params ...interface{}) (Result , error )
func DB .QueryContext (c context .Context , model, query interface{}, params ...interface{}) (Result , error )
func DB .QueryOne (model, query interface{}, params ...interface{}) (Result , error )
func DB .QueryOneContext (c context .Context , model, query interface{}, params ...interface{}) (Result , error )
func (*Query ).CopyFrom (r io .Reader , query interface{}, params ...interface{}) (Result , error )
func (*Query ).CopyTo (w io .Writer , query interface{}, params ...interface{}) (Result , error )
func (*Query ).Delete (values ...interface{}) (Result , error )
func (*Query ).Exec (query interface{}, params ...interface{}) (Result , error )
func (*Query ).ExecOne (query interface{}, params ...interface{}) (Result , error )
func (*Query ).ForceDelete (values ...interface{}) (Result , error )
func (*Query ).Insert (values ...interface{}) (Result , error )
func (*Query ).Query (model, query interface{}, params ...interface{}) (Result , error )
func (*Query ).QueryOne (model, query interface{}, params ...interface{}) (Result , error )
func (*Query ).Update (scan ...interface{}) (Result , error )
func (*Query ).UpdateNotZero (scan ...interface{}) (Result , error )
func github.com/go-pg/pg/v10.DBI .CopyFrom (r io .Reader , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .CopyTo (w io .Writer , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .Exec (query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .ExecContext (c context .Context , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .ExecOne (query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .ExecOneContext (c context .Context , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .Query (model, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .QueryContext (c context .Context , model, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .QueryOne (model, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.DBI .QueryOneContext (c context .Context , model, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).Exec (params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).ExecContext (c context .Context , params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).ExecOne (params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).ExecOneContext (c context .Context , params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).Query (model interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).QueryContext (c context .Context , model interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).QueryOne (model interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).QueryOneContext (c context .Context , model interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).CopyFrom (r io .Reader , query interface{}, params ...interface{}) (res pg .Result , err error )
func github.com/go-pg/pg/v10.(*Tx ).CopyTo (w io .Writer , query interface{}, params ...interface{}) (res pg .Result , err error )
func github.com/go-pg/pg/v10.(*Tx ).Exec (query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).ExecContext (c context .Context , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).ExecOne (query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).ExecOneContext (c context .Context , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).Query (model interface{}, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).QueryContext (c context .Context , model interface{}, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).QueryOne (model interface{}, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).QueryOneContext (c context .Context , model interface{}, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/migrations/v8.DB .CopyFrom (r io .Reader , query interface{}, params ...interface{}) (Result , error )
func github.com/go-pg/migrations/v8.DB .CopyTo (w io .Writer , query interface{}, params ...interface{}) (Result , error )
func github.com/go-pg/migrations/v8.DB .Exec (query interface{}, params ...interface{}) (Result , error )
func github.com/go-pg/migrations/v8.DB .ExecOne (query interface{}, params ...interface{}) (Result , error )
func github.com/go-pg/migrations/v8.DB .Query (coll, query interface{}, params ...interface{}) (Result , error )
func github.com/go-pg/migrations/v8.DB .QueryOne (model, query interface{}, params ...interface{}) (Result , error )
/* 13+ unexporteds ... */ /* 13+ unexporteds: */
func (*Query ).query (ctx context .Context , model Model , query interface{}) (Result , error )
func (*Query ).returningQuery (c context .Context , model Model , query interface{}) (Result , error )
func (*Query ).update (values []interface{}, omitZero bool ) (Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).exec (ctx context .Context , params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).execOne (c context .Context , params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).extQuery (c context .Context , cn *pool .Conn , name string , params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).extQueryData (c context .Context , cn *pool .Conn , name string , model interface{}, columns []types .ColumnInfo , params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).query (ctx context .Context , model interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Stmt ).queryOne (c context .Context , model interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).exec (ctx context .Context , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).execOne (c context .Context , query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).query (ctx context .Context , model interface{}, query interface{}, params ...interface{}) (pg .Result , error )
func github.com/go-pg/pg/v10.(*Tx ).queryOne (c context .Context , model interface{}, query interface{}, params ...interface{}) (pg .Result , error )
type SafeQueryAppender (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
params []interface{}
query string
Methods (total 3, all are exported )
(*SafeQueryAppender) AppendQuery (fmter QueryFormatter , b []byte ) ([]byte , error )
(*SafeQueryAppender) AppendValue (b []byte , quote int ) ([]byte , error )
(*SafeQueryAppender) Value () types .Safe
Implements (at least 3, in which 2 are exported )
*SafeQueryAppender : QueryAppender
*SafeQueryAppender : github.com/go-pg/pg/v10/types.ValueAppender
/* at least one unexported ... */ /* at least one unexported: */
*SafeQueryAppender : github.com/go-pg/zerochecker.valueAppender
As Outputs Of (at least 2, both are exported )
func SafeQuery (query string , params ...interface{}) *SafeQueryAppender
func github.com/go-pg/pg/v10.SafeQuery (query string , params ...interface{}) *SafeQueryAppender
type SelectQuery (struct)
Fields (total 2, neither is exported )
/* 2 unexporteds ... */ /* 2 unexporteds: */
count string
q *Query
Methods (total 9, in which 6 are exported )
(*SelectQuery) AppendQuery (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*SelectQuery) AppendTemplate (b []byte ) ([]byte , error )
(*SelectQuery) Clone () QueryCommand
(*SelectQuery) Operation () QueryOp
(*SelectQuery) Query () *Query
(*SelectQuery) String () string
/* 3 unexporteds ... */ /* 3 unexporteds: */
( SelectQuery) appendColumns (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*SelectQuery) appendTables (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*SelectQuery) isDistinct () bool
Implements (at least 8, in which 5 are exported )
*SelectQuery : QueryAppender
*SelectQuery : QueryCommand
*SelectQuery : TemplateAppender
*SelectQuery : expvar.Var
*SelectQuery : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*SelectQuery : github.com/aws/smithy-go/middleware.stringer
*SelectQuery : context.stringer
*SelectQuery : runtime.stringer
As Outputs Of (at least 2, in which 1 are exported )
func NewSelectQuery (q *Query ) *SelectQuery
/* at least one unexported ... */ /* at least one unexported: */
func (*Query ).countSelectQuery (column string ) *SelectQuery
type Table (struct)
Table represents a SQL table created from Go struct.
Fields (total 22, in which 17 are exported )
Alias types .Safe
DataFields []*Field
Fields []*Field
// PKs + DataFields
FieldsMap map[string ]*Field
Methods map[string ]*Method
ModelName string
PKs []*Field
PartitionBy string
Relations map[string ]*Relation
SQLName types .Safe
SQLNameForSelects types .Safe
SetSoftDeleteField func(fv reflect .Value ) error
SoftDeleteField *Field
Tablespace types .Safe
Type reflect .Type
TypeName string
Unique map[string ][]*Field
/* 5 unexporteds ... */ /* 5 unexporteds: */
allFields []*Field
// read only
fieldsMapMu sync .RWMutex
flags uint16
skippedFields []*Field
zeroStruct reflect .Value
Methods (total 34, in which 6 are exported )
(*Table) AddField (field *Field )
(*Table) AppendParam (b []byte , strct reflect .Value , name string ) ([]byte , bool )
(*Table) GetField (name string ) (*Field , error )
(*Table) HasField (name string ) bool
(*Table) RemoveField (field *Field )
(*Table) String () string
/* 28 unexporteds ... */ /* 28 unexporteds: */
(*Table) addFields (typ reflect .Type , baseIndex []int )
(*Table) addRelation (rel *Relation )
(*Table) checkPKs () error
(*Table) getField (name string ) *Field
(*Table) hasFlag (flag uint16 ) bool
(*Table) init1 ()
(*Table) init2 ()
(*Table) initFields ()
(*Table) initInlines ()
(*Table) initMethods ()
(*Table) initRelations ()
(*Table) inlineFields (strct *Field , path map[reflect .Type ]struct{})
(*Table) mustBelongsToRelation (field *Field , pgTag *tagparser .Tag ) bool
(*Table) mustHasManyRelation (field *Field , pgTag *tagparser .Tag ) bool
(*Table) mustHasOneRelation (field *Field , pgTag *tagparser .Tag ) bool
(*Table) mustM2MRelation (field *Field , pgTag *tagparser .Tag ) bool
(*Table) mustSoftDelete () error
(*Table) newField (f reflect .StructField , index []int ) *Field
nolint
(*Table) setFlag (flag uint16 )
(*Table) setName (name types .Safe )
(*Table) tryBelongsToOne (joinTable *Table , field *Field , pgTag *tagparser .Tag ) bool
(*Table) tryHasManyRelation (field *Field , pgTag *tagparser .Tag ) bool
(*Table) tryHasOne (joinTable *Table , field *Field , pgTag *tagparser .Tag ) bool
(*Table) tryM2MRelation (field *Field , pgTag *tagparser .Tag ) bool
(*Table) tryRelation (field *Field ) bool
(*Table) tryRelationSlice (field *Field , pgTag *tagparser .Tag ) bool
nolint
(*Table) tryRelationStruct (field *Field , pgTag *tagparser .Tag ) bool
(*Table) tryRelationType (field *Field , rel string , pgTag *tagparser .Tag ) bool
Implements (at least 5, in which 2 are exported )
*Table : expvar.Var
*Table : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*Table : github.com/aws/smithy-go/middleware.stringer
*Table : context.stringer
*Table : runtime.stringer
As Outputs Of (at least 3, in which 2 are exported )
func GetTable (typ reflect .Type ) *Table
func TableModel .Table () *Table
/* at least one unexported ... */ /* at least one unexported: */
func newTable (typ reflect .Type ) *Table
As Inputs Of (at least 6, none are exported )
/* 6+ unexporteds ... */ /* 6+ unexporteds: */
func appendUniqueConstraints (b []byte , table *Table ) []byte
func foreignKeys (base, join *Table , fk string , tryFK bool ) []*Field
func newStructTableModel (table *Table ) *structTableModel
func newTableInProgress (table *Table ) *tableInProgress
func (*Table).tryBelongsToOne (joinTable *Table , field *Field , pgTag *tagparser .Tag ) bool
func (*Table).tryHasOne (joinTable *Table , field *Field , pgTag *tagparser .Tag ) bool
type TableModel (interface)
Methods (total 27, in which 25 are exported )
( TableModel) AddColumnScanner (ColumnScanner ) error
AddColumnScanner adds the ColumnScanner to the model.
( TableModel) AddJoin (join ) *join
( TableModel) AfterDelete (context .Context ) error
( TableModel) AfterInsert (context .Context ) error
( TableModel) AfterScan (context .Context ) error
( TableModel) AfterSelect (context .Context ) error
( TableModel) AfterUpdate (context .Context ) error
( TableModel) AppendParam (QueryFormatter , []byte , string ) ([]byte , bool )
( TableModel) BeforeDelete (context .Context ) (context .Context , error )
( TableModel) BeforeInsert (context .Context ) (context .Context , error )
( TableModel) BeforeUpdate (context .Context ) (context .Context , error )
( TableModel) GetJoin (string ) *join
( TableModel) GetJoins () []join
( TableModel) Index () []int
( TableModel) Init () error
Init is responsible to initialize/reset model state.
It is called only once no matter how many rows were returned.
( TableModel) IsNil () bool
( TableModel) Join (string , func(*Query ) (*Query , error )) *join
( TableModel) Kind () reflect .Kind
( TableModel) Mount (reflect .Value )
( TableModel) NextColumnScanner () ColumnScanner
NextColumnScanner returns a ColumnScanner that is used to scan columns
from the current row. It is called once for every row.
( TableModel) ParentIndex () []int
( TableModel) Relation () *Relation
( TableModel) Root () reflect .Value
( TableModel) Table () *Table
( TableModel) Value () reflect .Value
/* 2 unexporteds ... */ /* 2 unexporteds: */
( TableModel) scanColumn (types .ColumnInfo , types .Reader , int ) (bool , error )
( TableModel) setSoftDeleteField () error
Implemented By (at least 4, none are exported )
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
*m2mModel
*manyModel
*sliceTableModel
*structTableModel
Implements (at least 10, all are exported )
TableModel : AfterDeleteHook
TableModel : AfterInsertHook
TableModel : AfterScanHook
TableModel : AfterSelectHook
TableModel : AfterUpdateHook
TableModel : BeforeDeleteHook
TableModel : BeforeInsertHook
TableModel : BeforeUpdateHook
TableModel : HooklessModel
TableModel : Model
As Outputs Of (at least 3, in which 1 are exported )
func (*Query ).TableModel () TableModel
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func cloneTableModelJoins (tm TableModel ) TableModel
func newTableModelIndex (typ reflect .Type , root reflect .Value , index []int , rel *Relation ) (TableModel , error )
As Inputs Of (at least 3, in which 1 are exported )
func (*Formatter ).WithTableModel (model TableModel ) *Formatter
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func cloneTableModelJoins (tm TableModel ) TableModel
func dstValues (model TableModel , fields []*Field ) map[string ][]reflect .Value
type UpdateQuery (struct)
Fields (total 3, none are exported )
/* 3 unexporteds ... */ /* 3 unexporteds: */
omitZero bool
placeholder bool
q *Query
Methods (total 14, in which 6 are exported )
(*UpdateQuery) AppendQuery (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*UpdateQuery) AppendTemplate (b []byte ) ([]byte , error )
(*UpdateQuery) Clone () QueryCommand
(*UpdateQuery) Operation () QueryOp
(*UpdateQuery) Query () *Query
(*UpdateQuery) String () string
/* 8 unexporteds ... */ /* 8 unexporteds: */
(*UpdateQuery) appendMapSet (b []byte , m map[string ]interface{}) []byte
(*UpdateQuery) appendSetSlice (b []byte ) ([]byte , error )
(*UpdateQuery) appendSetStruct (fmter QueryFormatter , b []byte , strct reflect .Value ) ([]byte , error )
(*UpdateQuery) appendSliceModelData (fmter QueryFormatter , b []byte ) ([]byte , error )
(*UpdateQuery) appendSliceValues (fmter QueryFormatter , b []byte , fields []*Field , slice reflect .Value ) (_ []byte , err error )
(*UpdateQuery) appendValues (fmter QueryFormatter , b []byte , fields []*Field , strct reflect .Value ) (_ []byte , err error )
(*UpdateQuery) mustAppendSet (fmter QueryFormatter , b []byte ) (_ []byte , err error )
(*UpdateQuery) mustAppendWhere (fmter QueryFormatter , b []byte , isSliceModelWithData bool ) (_ []byte , err error )
Implements (at least 8, in which 5 are exported )
*UpdateQuery : QueryAppender
*UpdateQuery : QueryCommand
*UpdateQuery : TemplateAppender
*UpdateQuery : expvar.Var
*UpdateQuery : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*UpdateQuery : github.com/aws/smithy-go/middleware.stringer
*UpdateQuery : context.stringer
*UpdateQuery : runtime.stringer
As Outputs Of (at least one exported )
func NewUpdateQuery (q *Query , omitZero bool ) *UpdateQuery
/* 32 unexporteds ... */ /* 32 unexporteds: */ type hasManyColumnsAppender (struct)
Fields (total 8, in which 6 are exported )
join .ApplyQuery func(*Query ) (*Query , error )
join .BaseModel TableModel
join .Columns []string
join .JoinModel TableModel
join .Parent *join
join .Rel *Relation
/* 2 unexporteds ... */ /* 2 unexporteds: */
join *join
join .on []*condAppender
Methods (total 14, in which 3 are exported )
( hasManyColumnsAppender) AppendOn (app *condAppender )
(*hasManyColumnsAppender) AppendQuery (fmter QueryFormatter , b []byte ) ([]byte , error )
( hasManyColumnsAppender) Select (fmter QueryFormatter , q *Query ) error
/* 11 unexporteds ... */ /* 11 unexporteds: */
( hasManyColumnsAppender) appendAlias (b []byte ) []byte
( hasManyColumnsAppender) appendAliasColumn (b []byte , column string ) []byte
( hasManyColumnsAppender) appendBaseAlias (b []byte ) []byte
( hasManyColumnsAppender) appendHasOneColumns (b []byte ) []byte
( hasManyColumnsAppender) appendHasOneJoin (fmter QueryFormatter , b []byte , q *Query ) (_ []byte , err error )
( hasManyColumnsAppender) appendSoftDelete (b []byte , flags queryFlag ) []byte
( hasManyColumnsAppender) hasParent () bool
( hasManyColumnsAppender) m2mQuery (fmter QueryFormatter , q *Query ) (*Query , error )
( hasManyColumnsAppender) manyQuery (q *Query ) (*Query , error )
( hasManyColumnsAppender) selectM2M (fmter QueryFormatter , q *Query ) error
( hasManyColumnsAppender) selectMany (_ QueryFormatter , q *Query ) error
Implements (at least one exported )
*hasManyColumnsAppender : QueryAppender
type join (struct)
Fields (total 7, in which 6 are exported )
ApplyQuery func(*Query ) (*Query , error )
BaseModel TableModel
Columns []string
JoinModel TableModel
Parent *join
Rel *Relation
/* one unexported ... */ /* one unexported: */
on []*condAppender
Methods (total 13, in which 2 are exported )
(*join) AppendOn (app *condAppender )
(*join) Select (fmter QueryFormatter , q *Query ) error
/* 11 unexporteds ... */ /* 11 unexporteds: */
(*join) appendAlias (b []byte ) []byte
(*join) appendAliasColumn (b []byte , column string ) []byte
(*join) appendBaseAlias (b []byte ) []byte
(*join) appendHasOneColumns (b []byte ) []byte
(*join) appendHasOneJoin (fmter QueryFormatter , b []byte , q *Query ) (_ []byte , err error )
(*join) appendSoftDelete (b []byte , flags queryFlag ) []byte
(*join) hasParent () bool
(*join) m2mQuery (fmter QueryFormatter , q *Query ) (*Query , error )
(*join) manyQuery (q *Query ) (*Query , error )
(*join) selectM2M (fmter QueryFormatter , q *Query ) error
(*join) selectMany (_ QueryFormatter , q *Query ) error
As Outputs Of (at least 4, all are exported )
func TableModel .AddJoin (join ) *join
func TableModel .GetJoin (string ) *join
func TableModel .GetJoins () []join
func TableModel .Join (string , func(*Query ) (*Query , error )) *join
As Inputs Of (at least 6, in which 1 are exported )
func TableModel .AddJoin (join ) *join
/* 5+ unexporteds ... */ /* 5+ unexporteds: */
func appendAlias (b []byte , j *join ) []byte
func newM2MModel (j *join ) *m2mModel
func newManyModel (j *join ) *manyModel
func (*Query )._forEachHasOneJoin (fn func(*join ) error , joins []join ) error
func (*Query ).selectJoins (joins []join ) error
type m2mModel (struct)
Fields (total 18, none are exported )
/* 18 unexporteds ... */ /* 18 unexporteds: */
baseTable *Table
buf []byte
columns map[string ]string
dstValues map[string ][]reflect .Value
rel *Relation
sliceTableModel *sliceTableModel
sliceTableModel .nextElem func() reflect .Value
sliceTableModel .slice reflect .Value
sliceTableModel .sliceLen int
sliceTableModel .sliceOfPtr bool
sliceTableModel .structTableModel structTableModel
sliceTableModel .structTableModel .index []int
sliceTableModel .structTableModel .joins []join
sliceTableModel .structTableModel .root reflect .Value
sliceTableModel .structTableModel .strct reflect .Value
sliceTableModel .structTableModel .structInitErr error
sliceTableModel .structTableModel .structInited bool
sliceTableModel .structTableModel .table *Table
Methods (total 37, in which 29 are exported )
(*m2mModel) AddColumnScanner (_ ColumnScanner ) error
( m2mModel) AddJoin (j join ) *join
( m2mModel) AfterDelete (ctx context .Context ) error
( m2mModel) AfterInsert (ctx context .Context ) error
( m2mModel) AfterScan (ctx context .Context ) error
( m2mModel) AfterSelect (ctx context .Context ) error
( m2mModel) AfterUpdate (ctx context .Context ) error
( m2mModel) AppendParam (fmter QueryFormatter , b []byte , name string ) ([]byte , bool )
( m2mModel) BeforeDelete (ctx context .Context ) (context .Context , error )
( m2mModel) BeforeInsert (ctx context .Context ) (context .Context , error )
( m2mModel) BeforeScan (ctx context .Context ) error
( m2mModel) BeforeUpdate (ctx context .Context ) (context .Context , error )
( m2mModel) Bind (bind reflect .Value )
( m2mModel) GetJoin (name string ) *join
( m2mModel) GetJoins () []join
( m2mModel) Index () []int
( m2mModel) Init () error
( m2mModel) IsNil () bool
( m2mModel) Join (name string , apply func(*Query ) (*Query , error )) *join
( m2mModel) Kind () reflect .Kind
( m2mModel) Mount (host reflect .Value )
(*m2mModel) NextColumnScanner () ColumnScanner
( m2mModel) ParentIndex () []int
( m2mModel) Relation () *Relation
( m2mModel) Root () reflect .Value
(*m2mModel) ScanColumn (col types .ColumnInfo , rd types .Reader , n int ) error
( m2mModel) String () string
( m2mModel) Table () *Table
( m2mModel) Value () reflect .Value
/* 8 unexporteds ... */ /* 8 unexporteds: */
( m2mModel) init (sliceType reflect .Type )
( m2mModel) initStruct () error
( m2mModel) join (bind reflect .Value , name string , apply func(*Query ) (*Query , error )) *join
(*m2mModel) modelIDMap (b []byte ) ([]byte , error )
( m2mModel) mountJoins ()
( m2mModel) scanColumn (col types .ColumnInfo , rd types .Reader , n int ) (bool , error )
( m2mModel) setSoftDeleteField () error
( m2mModel) useQueryOne ()
nolint
Implements (at least 18, in which 15 are exported )
m2mModel : AfterDeleteHook
m2mModel : AfterInsertHook
m2mModel : AfterScanHook
m2mModel : AfterSelectHook
m2mModel : AfterUpdateHook
m2mModel : BeforeDeleteHook
m2mModel : BeforeInsertHook
m2mModel : BeforeScanHook
m2mModel : BeforeUpdateHook
*m2mModel : ColumnScanner
*m2mModel : HooklessModel
*m2mModel : Model
*m2mModel : TableModel
m2mModel : expvar.Var
m2mModel : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
m2mModel : github.com/aws/smithy-go/middleware.stringer
m2mModel : context.stringer
m2mModel : runtime.stringer
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newM2MModel (j *join ) *m2mModel
type manyModel (struct)
Fields (total 17, none are exported )
/* 17 unexporteds ... */ /* 17 unexporteds: */
baseTable *Table
buf []byte
dstValues map[string ][]reflect .Value
rel *Relation
sliceTableModel *sliceTableModel
sliceTableModel .nextElem func() reflect .Value
sliceTableModel .slice reflect .Value
sliceTableModel .sliceLen int
sliceTableModel .sliceOfPtr bool
sliceTableModel .structTableModel structTableModel
sliceTableModel .structTableModel .index []int
sliceTableModel .structTableModel .joins []join
sliceTableModel .structTableModel .root reflect .Value
sliceTableModel .structTableModel .strct reflect .Value
sliceTableModel .structTableModel .structInitErr error
sliceTableModel .structTableModel .structInited bool
sliceTableModel .structTableModel .table *Table
Methods (total 36, in which 29 are exported )
(*manyModel) AddColumnScanner (model ColumnScanner ) error
( manyModel) AddJoin (j join ) *join
( manyModel) AfterDelete (ctx context .Context ) error
( manyModel) AfterInsert (ctx context .Context ) error
( manyModel) AfterScan (ctx context .Context ) error
( manyModel) AfterSelect (ctx context .Context ) error
( manyModel) AfterUpdate (ctx context .Context ) error
( manyModel) AppendParam (fmter QueryFormatter , b []byte , name string ) ([]byte , bool )
( manyModel) BeforeDelete (ctx context .Context ) (context .Context , error )
( manyModel) BeforeInsert (ctx context .Context ) (context .Context , error )
( manyModel) BeforeScan (ctx context .Context ) error
( manyModel) BeforeUpdate (ctx context .Context ) (context .Context , error )
( manyModel) Bind (bind reflect .Value )
( manyModel) GetJoin (name string ) *join
( manyModel) GetJoins () []join
( manyModel) Index () []int
( manyModel) Init () error
( manyModel) IsNil () bool
( manyModel) Join (name string , apply func(*Query ) (*Query , error )) *join
( manyModel) Kind () reflect .Kind
( manyModel) Mount (host reflect .Value )
(*manyModel) NextColumnScanner () ColumnScanner
( manyModel) ParentIndex () []int
( manyModel) Relation () *Relation
( manyModel) Root () reflect .Value
( manyModel) ScanColumn (col types .ColumnInfo , rd types .Reader , n int ) error
( manyModel) String () string
( manyModel) Table () *Table
( manyModel) Value () reflect .Value
/* 7 unexporteds ... */ /* 7 unexporteds: */
( manyModel) init (sliceType reflect .Type )
( manyModel) initStruct () error
( manyModel) join (bind reflect .Value , name string , apply func(*Query ) (*Query , error )) *join
( manyModel) mountJoins ()
( manyModel) scanColumn (col types .ColumnInfo , rd types .Reader , n int ) (bool , error )
( manyModel) setSoftDeleteField () error
( manyModel) useQueryOne ()
nolint
Implements (at least 18, in which 15 are exported )
manyModel : AfterDeleteHook
manyModel : AfterInsertHook
manyModel : AfterScanHook
manyModel : AfterSelectHook
manyModel : AfterUpdateHook
manyModel : BeforeDeleteHook
manyModel : BeforeInsertHook
manyModel : BeforeScanHook
manyModel : BeforeUpdateHook
manyModel : ColumnScanner
*manyModel : HooklessModel
*manyModel : Model
*manyModel : TableModel
manyModel : expvar.Var
manyModel : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
manyModel : github.com/aws/smithy-go/middleware.stringer
manyModel : context.stringer
manyModel : runtime.stringer
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newManyModel (j *join ) *manyModel
type sliceModel (struct)
Fields (total 5, in which 1 are exported )
Discard Discard
/* 4 unexporteds ... */ /* 4 unexporteds: */
Discard .hookStubs hookStubs
nextElem func() reflect .Value
scan func(reflect .Value , types .Reader , int ) error
slice reflect .Value
Methods (total 12, all are exported )
( sliceModel) AddColumnScanner (ColumnScanner ) error
( sliceModel) AfterDelete (ctx context .Context ) error
( sliceModel) AfterInsert (ctx context .Context ) error
( sliceModel) AfterScan (ctx context .Context ) error
( sliceModel) AfterSelect (ctx context .Context ) error
( sliceModel) AfterUpdate (ctx context .Context ) error
( sliceModel) BeforeDelete (ctx context .Context ) (context .Context , error )
( sliceModel) BeforeInsert (ctx context .Context ) (context .Context , error )
( sliceModel) BeforeUpdate (ctx context .Context ) (context .Context , error )
(*sliceModel) Init () error
(*sliceModel) NextColumnScanner () ColumnScanner
(*sliceModel) ScanColumn (col types .ColumnInfo , rd types .Reader , n int ) error
Implements (at least 11, all are exported )
sliceModel : AfterDeleteHook
sliceModel : AfterInsertHook
sliceModel : AfterScanHook
sliceModel : AfterSelectHook
sliceModel : AfterUpdateHook
sliceModel : BeforeDeleteHook
sliceModel : BeforeInsertHook
sliceModel : BeforeUpdateHook
*sliceModel : ColumnScanner
*sliceModel : HooklessModel
*sliceModel : Model
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newSliceModel (slice reflect .Value , elemType reflect .Type ) *sliceModel
type sliceTableModel (struct)
Fields (total 13, none are exported )
/* 13 unexporteds ... */ /* 13 unexporteds: */
nextElem func() reflect .Value
slice reflect .Value
sliceLen int
sliceOfPtr bool
structTableModel structTableModel
structTableModel .index []int
structTableModel .joins []join
structTableModel .rel *Relation
structTableModel .root reflect .Value
structTableModel .strct reflect .Value
structTableModel .structInitErr error
structTableModel .structInited bool
structTableModel .table *Table
Methods (total 36, in which 29 are exported )
(*sliceTableModel) AddColumnScanner (_ ColumnScanner ) error
(*sliceTableModel) AddJoin (j join ) *join
(*sliceTableModel) AfterDelete (ctx context .Context ) error
(*sliceTableModel) AfterInsert (ctx context .Context ) error
(*sliceTableModel) AfterScan (ctx context .Context ) error
(*sliceTableModel) AfterSelect (ctx context .Context ) error
(*sliceTableModel) AfterUpdate (ctx context .Context ) error
(*sliceTableModel) AppendParam (fmter QueryFormatter , b []byte , name string ) ([]byte , bool )
(*sliceTableModel) BeforeDelete (ctx context .Context ) (context .Context , error )
(*sliceTableModel) BeforeInsert (ctx context .Context ) (context .Context , error )
(*sliceTableModel) BeforeScan (ctx context .Context ) error
(*sliceTableModel) BeforeUpdate (ctx context .Context ) (context .Context , error )
(*sliceTableModel) Bind (bind reflect .Value )
(*sliceTableModel) GetJoin (name string ) *join
(*sliceTableModel) GetJoins () []join
(*sliceTableModel) Index () []int
(*sliceTableModel) Init () error
(*sliceTableModel) IsNil () bool
(*sliceTableModel) Join (name string , apply func(*Query ) (*Query , error )) *join
(*sliceTableModel) Kind () reflect .Kind
(*sliceTableModel) Mount (host reflect .Value )
(*sliceTableModel) NextColumnScanner () ColumnScanner
(*sliceTableModel) ParentIndex () []int
(*sliceTableModel) Relation () *Relation
(*sliceTableModel) Root () reflect .Value
(*sliceTableModel) ScanColumn (col types .ColumnInfo , rd types .Reader , n int ) error
(*sliceTableModel) String () string
(*sliceTableModel) Table () *Table
(*sliceTableModel) Value () reflect .Value
/* 7 unexporteds ... */ /* 7 unexporteds: */
(*sliceTableModel) init (sliceType reflect .Type )
(*sliceTableModel) initStruct () error
(*sliceTableModel) join (bind reflect .Value , name string , apply func(*Query ) (*Query , error )) *join
(*sliceTableModel) mountJoins ()
(*sliceTableModel) scanColumn (col types .ColumnInfo , rd types .Reader , n int ) (bool , error )
(*sliceTableModel) setSoftDeleteField () error
(*sliceTableModel) useQueryOne ()
nolint
Implements (at least 18, in which 15 are exported )
*sliceTableModel : AfterDeleteHook
*sliceTableModel : AfterInsertHook
*sliceTableModel : AfterScanHook
*sliceTableModel : AfterSelectHook
*sliceTableModel : AfterUpdateHook
*sliceTableModel : BeforeDeleteHook
*sliceTableModel : BeforeInsertHook
*sliceTableModel : BeforeScanHook
*sliceTableModel : BeforeUpdateHook
*sliceTableModel : ColumnScanner
*sliceTableModel : HooklessModel
*sliceTableModel : Model
*sliceTableModel : TableModel
*sliceTableModel : expvar.Var
*sliceTableModel : fmt.Stringer
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
*sliceTableModel : github.com/aws/smithy-go/middleware.stringer
*sliceTableModel : context.stringer
*sliceTableModel : runtime.stringer
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func newSliceTableModel (slice reflect .Value , elemType reflect .Type ) *sliceTableModel
type structTableModel (struct)
Fields (total 8, none are exported )
/* 8 unexporteds ... */ /* 8 unexporteds: */
index []int
joins []join
rel *Relation
root reflect .Value
strct reflect .Value
structInitErr error
structInited bool
table *Table
Methods (total 34, in which 28 are exported )
(*structTableModel) AddColumnScanner (_ ColumnScanner ) error
(*structTableModel) AddJoin (j join ) *join
(*structTableModel) AfterDelete (ctx context .Context ) error
(*structTableModel) AfterInsert (ctx context .Context ) error
(*structTableModel) AfterScan (ctx context .Context ) error
(*structTableModel) AfterSelect (ctx context .Context ) error
(*structTableModel) AfterUpdate (ctx context .Context ) error
(*structTableModel) AppendParam (fmter QueryFormatter , b []byte , name string ) ([]byte , bool )
(*structTableModel) BeforeDelete (ctx context .Context ) (context .Context , error )
(*structTableModel) BeforeInsert (ctx context .Context ) (context .Context , error )
(*structTableModel) BeforeScan (ctx context .Context ) error
(*structTableModel) BeforeUpdate (ctx context .Context ) (context .Context , error )
(*structTableModel) GetJoin (name string ) *join
(*structTableModel) GetJoins () []join
(*structTableModel) Index () []int
( structTableModel) Init () error
(*structTableModel) IsNil () bool
(*structTableModel) Join (name string , apply func(*Query ) (*Query , error )) *join
(*structTableModel) Kind () reflect .Kind
(*structTableModel) Mount (host reflect .Value )
(*structTableModel) NextColumnScanner () ColumnScanner
(*structTableModel) ParentIndex () []int
(*structTableModel) Relation () *Relation
(*structTableModel) Root () reflect .Value
(*structTableModel) ScanColumn (col types .ColumnInfo , rd types .Reader , n int ) error
(*structTableModel) String () string
(*structTableModel) Table () *Table
(*structTableModel) Value () reflect .Value
/* 6 unexporteds ... */ /* 6 unexporteds: */
(*structTableModel) initStruct () error
(*structTableModel) join (bind reflect .Value , name string , apply func(*Query ) (*Query , error )) *join
(*structTableModel) mountJoins ()
(*structTableModel) scanColumn (col types .ColumnInfo , rd types .Reader , n int ) (bool , error )
(*structTableModel) setSoftDeleteField () error
(*structTableModel) useQueryOne () bool
Implements (at least 19, in which 15 are exported )
*structTableModel : AfterDeleteHook
*structTableModel : AfterInsertHook
*structTableModel : AfterScanHook
*structTableModel : AfterSelectHook
*structTableModel : AfterUpdateHook
*structTableModel : BeforeDeleteHook
*structTableModel : BeforeInsertHook
*structTableModel : BeforeScanHook
*structTableModel : BeforeUpdateHook
*structTableModel : ColumnScanner
*structTableModel : HooklessModel
*structTableModel : Model
*structTableModel : TableModel
*structTableModel : expvar.Var
*structTableModel : fmt.Stringer
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
*structTableModel : useQueryOne
*structTableModel : github.com/aws/smithy-go/middleware.stringer
*structTableModel : context.stringer
*structTableModel : runtime.stringer
As Outputs Of (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func newStructTableModel (table *Table ) *structTableModel
func newStructTableModelValue (v reflect .Value ) *structTableModel