Documentation ¶
Index ¶
- func InSlice(arr []ForeignKeyInfo, val ForeignKeyInfo) bool
- func InSliceStringList(arr []string, val string) bool
- type ColumnInfo
- type DBTableInfo
- type DbDialectType
- type DbProviderInterface
- type DbQuery
- type DbQueryInfo
- type DbRelationType
- type DbSqlBuilder
- func (this *DbSqlBuilder) And() *DbSqlBuilder
- func (this *DbSqlBuilder) DeleteExecute()
- func (this *DbSqlBuilder) End() *DbSqlBuilder
- func (this *DbSqlBuilder) FetchAll() []interface{}
- func (this *DbSqlBuilder) FetchOne() (interface{}, bool)
- func (this *DbSqlBuilder) InsertExecute()
- func (this *DbSqlBuilder) Limit(limit int) *DbSqlBuilder
- func (this *DbSqlBuilder) Or(sql string, param []interface{}) *DbSqlBuilder
- func (this *DbSqlBuilder) SaveExecute()
- func (this *DbSqlBuilder) Start() *DbSqlBuilder
- func (this *DbSqlBuilder) WhereAnd(fieldName []string) *DbSqlBuilder
- func (this *DbSqlBuilder) WhereOr(fieldName []string) *DbSqlBuilder
- func (this *DbSqlBuilder) WhereWithSql(sql string, param []interface{}) *DbSqlBuilder
- type FetchType
- type ForeignKeyInfo
- type Moudle
- func (this *Moudle) AddTable(dbtable interface{})
- func (this *Moudle) AddTableWithSchema(dbtable interface{}, tableName string, tableSchema string)
- func (this *Moudle) AddTableWithTableName(dbtable interface{}, tableName string)
- func (this *Moudle) Begin() *Trans
- func (this *Moudle) Close() error
- func (this *Moudle) Delete(structVal interface{})
- func (this *Moudle) DeleteWhere(structVal interface{}) *DbSqlBuilder
- func (this *Moudle) DeleteWithSql(sql string, parameter []interface{})
- func (this *Moudle) ExecuteWithSql(sql string, parameter []interface{})
- func (this *Moudle) FetchLazyField(structObj interface{}, fieldName []string)
- func (this *Moudle) GetCurrentSerialValue(structVal interface{}) int64
- func (this *Moudle) InitialDB(create bool)
- func (this *Moudle) Insert(structVal interface{}) *DbSqlBuilder
- func (this *Moudle) InsertWithSql(sql string, parameter []interface{})
- func (this *Moudle) Query(tableObj interface{}, fetchType FetchType, structName []string) *DbSqlBuilder
- func (this *Moudle) SimpleQuery(tableObj interface{}) *DbSqlBuilder
- func (this *Moudle) TableExistsInDB(tableName string) bool
- func (this *Moudle) Update(structVal interface{})
- func (this *Moudle) UpdateWithField(structVal interface{}, fieldName []string)
- func (this *Moudle) UpdateWithSql(sql string, parameter []interface{})
- func (this *Moudle) UpdateWithWhere(structVal interface{}, fieldName []string) *DbSqlBuilder
- type MysqlDBProvider
- func (this *MysqlDBProvider) AppendScanComplexField(list *[]interface{})
- func (this *MysqlDBProvider) Begin() (*sql.Tx, error)
- func (this *MysqlDBProvider) Close() error
- func (this *MysqlDBProvider) Commit(tx *sql.Tx) error
- func (this *MysqlDBProvider) ConnectionDb(dburl string) error
- func (this *MysqlDBProvider) CreateDefaultValue(defaultValue interface{}) string
- func (this *MysqlDBProvider) CreateForeignKey(tableName string, keyColumn string, refrenceTableName string, ...) (sql.Result, error)
- func (this *MysqlDBProvider) CreatePrimaryKey(tableName string, keyList []string) (sql.Result, error)
- func (this *MysqlDBProvider) CreateSqlTypeByLength(auto_increment bool, sqlType string, length int, scale int) string
- func (this *MysqlDBProvider) CreateTable(tableName string, sqlstr string, primaryKey []string) (sql.Result, error)
- func (this *MysqlDBProvider) DropTable(tableName string) (sql.Result, error)
- func (this *MysqlDBProvider) ExecuteSQL(sql string, ts *Trans) (sql.Result, error)
- func (this *MysqlDBProvider) GetCurrentSerialValue(tableName string, columnName string, ts *Trans) int64
- func (this *MysqlDBProvider) GetDBBoolType() string
- func (this *MysqlDBProvider) GetDBByteArrayType(length int) string
- func (this *MysqlDBProvider) GetDBComplex128Type() string
- func (this *MysqlDBProvider) GetDBComplex64Type() string
- func (this *MysqlDBProvider) GetDBFloat32Type() string
- func (this *MysqlDBProvider) GetDBFloat64Type() string
- func (this *MysqlDBProvider) GetDBInt16Type() string
- func (this *MysqlDBProvider) GetDBInt32Type() string
- func (this *MysqlDBProvider) GetDBInt64Type() string
- func (this *MysqlDBProvider) GetDBInt8Type() string
- func (this *MysqlDBProvider) GetDBIntType() string
- func (this *MysqlDBProvider) GetDBStringType(length int) string
- func (this *MysqlDBProvider) GetDBTimeType() string
- func (this *MysqlDBProvider) GetDBUint16Type() string
- func (this *MysqlDBProvider) GetDBUint32Type() string
- func (this *MysqlDBProvider) GetDBUint64Type() string
- func (this *MysqlDBProvider) GetDBUint8Type() string
- func (this *MysqlDBProvider) GetDBUintType() string
- func (this *MysqlDBProvider) GetInsertByteDataSql(byteval []byte) string
- func (this *MysqlDBProvider) GetInsertDBComplex128Sql(val complex128) string
- func (this *MysqlDBProvider) GetInsertDBComplex64Sql(val complex128) string
- func (this *MysqlDBProvider) GetInsertDBTimeSql(ti time.Time) string
- func (this *MysqlDBProvider) Insert(sql string, ts *Trans) (sql.Result, error)
- func (this *MysqlDBProvider) LimitSql(limit int) string
- func (this *MysqlDBProvider) PrepareExecuteSQL(sql string, parameter []interface{}, ts *Trans)
- func (this *MysqlDBProvider) Query(sql string, ts *Trans) (*sql.Rows, error)
- func (this *MysqlDBProvider) SetMaxConnection(max int)
- func (this *MysqlDBProvider) SetMinConnection(max int)
- func (this *MysqlDBProvider) TableExistsInDB(tableName string) (bool, error)
- func (this *MysqlDBProvider) Update(sql string, ts *Trans) (sql.Result, error)
- type PostgresqlDBProvider
- func (this *PostgresqlDBProvider) AppendScanComplexField(list *[]interface{})
- func (this *PostgresqlDBProvider) Begin() (*sql.Tx, error)
- func (this *PostgresqlDBProvider) Close() error
- func (this *PostgresqlDBProvider) Commit(tx *sql.Tx) error
- func (this *PostgresqlDBProvider) ConnectionDb(dburl string) error
- func (this *PostgresqlDBProvider) CreateDefaultValue(defaultValue interface{}) string
- func (this *PostgresqlDBProvider) CreateForeignKey(tableName string, keyColumn string, refrenceTableName string, ...) (sql.Result, error)
- func (this *PostgresqlDBProvider) CreatePrimaryKey(tableName string, keyList []string) (sql.Result, error)
- func (this *PostgresqlDBProvider) CreateSqlTypeByLength(auto_increment bool, sqlType string, length int, scale int) string
- func (this *PostgresqlDBProvider) CreateTable(tableName string, sqlstr string, primaryKey []string) (sql.Result, error)
- func (this *PostgresqlDBProvider) DropTable(tableName string) (sql.Result, error)
- func (this *PostgresqlDBProvider) ExecuteSQL(sql string, ts *Trans) (sql.Result, error)
- func (this *PostgresqlDBProvider) GetCurrentSerialValue(tableName string, columnName string, ts *Trans) int64
- func (this *PostgresqlDBProvider) GetDBBoolType() string
- func (this *PostgresqlDBProvider) GetDBByteArrayType(length int) string
- func (this *PostgresqlDBProvider) GetDBComplex128Type() string
- func (this *PostgresqlDBProvider) GetDBComplex64Type() string
- func (this *PostgresqlDBProvider) GetDBFloat32Type() string
- func (this *PostgresqlDBProvider) GetDBFloat64Type() string
- func (this *PostgresqlDBProvider) GetDBInt16Type() string
- func (this *PostgresqlDBProvider) GetDBInt32Type() string
- func (this *PostgresqlDBProvider) GetDBInt64Type() string
- func (this *PostgresqlDBProvider) GetDBInt8Type() string
- func (this *PostgresqlDBProvider) GetDBIntType() string
- func (this *PostgresqlDBProvider) GetDBStringType(length int) string
- func (this *PostgresqlDBProvider) GetDBTimeType() string
- func (this *PostgresqlDBProvider) GetDBUint16Type() string
- func (this *PostgresqlDBProvider) GetDBUint32Type() string
- func (this *PostgresqlDBProvider) GetDBUint64Type() string
- func (this *PostgresqlDBProvider) GetDBUint8Type() string
- func (this *PostgresqlDBProvider) GetDBUintType() string
- func (this *PostgresqlDBProvider) GetInsertByteDataSql(byteval []byte) string
- func (this *PostgresqlDBProvider) GetInsertDBComplex128Sql(val complex128) string
- func (this *PostgresqlDBProvider) GetInsertDBComplex64Sql(val complex128) string
- func (this *PostgresqlDBProvider) GetInsertDBTimeSql(ti time.Time) string
- func (this *PostgresqlDBProvider) Insert(sql string, ts *Trans) (sql.Result, error)
- func (this *PostgresqlDBProvider) LimitSql(limit int) string
- func (this *PostgresqlDBProvider) PrepareExecuteSQL(sql string, parameter []interface{}, ts *Trans)
- func (this *PostgresqlDBProvider) Query(sql string, ts *Trans) (*sql.Rows, error)
- func (this *PostgresqlDBProvider) SetMaxConnection(max int)
- func (this *PostgresqlDBProvider) SetMinConnection(max int)
- func (this *PostgresqlDBProvider) TableExistsInDB(tableName string) (bool, error)
- func (this *PostgresqlDBProvider) Update(sql string, ts *Trans) (sql.Result, error)
- type RelationInfo
- type Trans
- func (this *Trans) Commit() error
- func (this *Trans) Delete(structVal interface{})
- func (this *Trans) DeleteWhere(structVal interface{}) *DbSqlBuilder
- func (this *Trans) DeleteWithSql(sql string, parameter []interface{})
- func (this *Trans) ExecuteWithSql(sql string, parameter []interface{})
- func (this *Trans) FetchLazyField(structVal interface{}, fieldName []string)
- func (this *Trans) GetCurrentSerialValue(structVal interface{}) int64
- func (this *Trans) Insert(structVal interface{}) *DbSqlBuilder
- func (this *Trans) InsertWithSql(sql string, parameter []interface{})
- func (this *Trans) Query(tableObj interface{}, fetchType FetchType, structName []string) *DbSqlBuilder
- func (this *Trans) Rollback() error
- func (this *Trans) SimpleQuery(tableObj interface{}) *DbSqlBuilder
- func (this *Trans) UpdateWithSql(sql string, parameter []interface{})
- func (this *Trans) UpdateWithWhere(structVal interface{}, fieldName []string) *DbSqlBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InSlice ¶
func InSlice(arr []ForeignKeyInfo, val ForeignKeyInfo) bool
func InSliceStringList ¶
Types ¶
type ColumnInfo ¶
type DBTableInfo ¶
type DbProviderInterface ¶
type DbProviderInterface interface { ConnectionDb(dburl string) error Query(sql string, tx *Trans) (*sql.Rows, error) Insert(sql string, tx *Trans) (sql.Result, error) Update(sql string, tx *Trans) (sql.Result, error) CreateTable(tableName string, sqlstr string, primaryKey []string) (sql.Result, error) DropTable(tableName string) (sql.Result, error) ExecuteSQL(sql string, tx *Trans) (sql.Result, error) PrepareExecuteSQL(sql string, parameter []interface{}, tx *Trans) CreatePrimaryKey(tableName string, keyList []string) (sql.Result, error) CreateForeignKey(tableName string, keyColumn string, refrenceTableName string, referenceColumnName string) (sql.Result, error) Begin() (*sql.Tx, error) Close() error Commit(tx *sql.Tx) error LimitSql(limit int) string GetDBIntType() string GetDBInt8Type() string GetDBInt16Type() string GetDBInt32Type() string GetDBInt64Type() string GetDBUintType() string GetDBUint8Type() string GetDBUint16Type() string GetDBUint32Type() string GetDBUint64Type() string GetDBFloat32Type() string GetDBFloat64Type() string GetDBComplex64Type() string GetDBComplex128Type() string GetDBBoolType() string GetDBStringType(length int) string GetDBTimeType() string GetDBByteArrayType(length int) string CreateSqlTypeByLength(auto_increment bool, sqlType string, length int, scale int) string CreateDefaultValue(defaultValue interface{}) string GetInsertDBComplex64Sql(val complex128) string GetInsertDBComplex128Sql(val complex128) string GetInsertDBTimeSql(time.Time) string SetMaxConnection(max int) SetMinConnection(max int) AppendScanComplexField(list *[]interface{}) TableExistsInDB(tableName string) (bool, error) GetInsertByteDataSql(byteval []byte) string GetCurrentSerialValue(tableName string, columnName string, tx *Trans) int64 }
type DbQuery ¶
type DbQuery interface { Query(tableObj interface{}, fetchType FetchType, structName []string) *DbSqlBuilder SimpleQuery(tableObj interface{}) *DbSqlBuilder Insert(structVal interface{}) *DbSqlBuilder Update(structVal interface{}) UpdateWithField(structVal interface{}, fieldName []string) UpdateWithWhere(structVal interface{}, fieldName []string) *DbSqlBuilder InsertWithSql(sql string, parameter []interface{}) UpdateWithSql(sql string, parameter []interface{}) ExecuteWithSql(sql string, parameter []interface{}) DeleteWithSql(sql string, parameter []interface{}) DeleteWhere(structVal interface{}) *DbSqlBuilder Delete(structVal interface{}) }
type DbQueryInfo ¶
type DbQueryInfo interface { Limit(limit int) *DbSqlBuilder FetchOne() interface{} FetchAll() []interface{} FetchLazyField(fieldName []string) WhereAnd(fieldName []string) *DbSqlBuilder WhereOr(fieldName []string) *DbSqlBuilder WhereWithSql(sql string, param []interface{}) *DbSqlBuilder And() *DbSqlBuilder Or() *DbSqlBuilder Start() *DbSqlBuilder End() *DbSqlBuilder SaveExecute() DeleteExecute() InsertExecute() GetCurrentSerialValue(structVal interface{}) int64 }
type DbRelationType ¶
type DbRelationType int
const ( ONE_TO_MANY DbRelationType = iota MANY_TO_ONE ONE_TO_ONE )
type DbSqlBuilder ¶
type DbSqlBuilder struct {
// contains filtered or unexported fields
}
func (*DbSqlBuilder) And ¶
func (this *DbSqlBuilder) And() *DbSqlBuilder
func (*DbSqlBuilder) DeleteExecute ¶
func (this *DbSqlBuilder) DeleteExecute()
func (*DbSqlBuilder) End ¶
func (this *DbSqlBuilder) End() *DbSqlBuilder
func (*DbSqlBuilder) FetchAll ¶
func (this *DbSqlBuilder) FetchAll() []interface{}
func (*DbSqlBuilder) FetchOne ¶
func (this *DbSqlBuilder) FetchOne() (interface{}, bool)
func (*DbSqlBuilder) InsertExecute ¶
func (this *DbSqlBuilder) InsertExecute()
func (*DbSqlBuilder) Limit ¶
func (this *DbSqlBuilder) Limit(limit int) *DbSqlBuilder
func (*DbSqlBuilder) Or ¶
func (this *DbSqlBuilder) Or(sql string, param []interface{}) *DbSqlBuilder
func (*DbSqlBuilder) SaveExecute ¶
func (this *DbSqlBuilder) SaveExecute()
func (*DbSqlBuilder) Start ¶
func (this *DbSqlBuilder) Start() *DbSqlBuilder
func (*DbSqlBuilder) WhereAnd ¶
func (this *DbSqlBuilder) WhereAnd(fieldName []string) *DbSqlBuilder
func (*DbSqlBuilder) WhereOr ¶
func (this *DbSqlBuilder) WhereOr(fieldName []string) *DbSqlBuilder
func (*DbSqlBuilder) WhereWithSql ¶
func (this *DbSqlBuilder) WhereWithSql(sql string, param []interface{}) *DbSqlBuilder
type ForeignKeyInfo ¶
type Moudle ¶
type Moudle struct { DbDialect DbDialectType DbName string DbConnectionUrl string DbUserName string DbPassword string DbUrlParameter string DbTableInfoByTableName map[string]*DBTableInfo DbTableInfoByStructName map[string]*DBTableInfo DbProiver DbProviderInterface ConnectionStatus bool RelationInfoList []RelationInfo RelationMap map[string]interface{} }
func CreateModuleInstance ¶
func (*Moudle) AddTableWithSchema ¶
func (*Moudle) AddTableWithTableName ¶
func (*Moudle) DeleteWhere ¶
func (this *Moudle) DeleteWhere(structVal interface{}) *DbSqlBuilder
func (*Moudle) DeleteWithSql ¶
func (*Moudle) ExecuteWithSql ¶
func (*Moudle) FetchLazyField ¶
func (*Moudle) GetCurrentSerialValue ¶
func (*Moudle) Insert ¶
func (this *Moudle) Insert(structVal interface{}) *DbSqlBuilder
func (*Moudle) InsertWithSql ¶
func (*Moudle) Query ¶
func (this *Moudle) Query(tableObj interface{}, fetchType FetchType, structName []string) *DbSqlBuilder
func (*Moudle) SimpleQuery ¶
func (this *Moudle) SimpleQuery(tableObj interface{}) *DbSqlBuilder
func (*Moudle) TableExistsInDB ¶
func (*Moudle) UpdateWithField ¶
func (*Moudle) UpdateWithSql ¶
func (*Moudle) UpdateWithWhere ¶
func (this *Moudle) UpdateWithWhere(structVal interface{}, fieldName []string) *DbSqlBuilder
type MysqlDBProvider ¶
type MysqlDBProvider struct {
// contains filtered or unexported fields
}
func (*MysqlDBProvider) AppendScanComplexField ¶
func (this *MysqlDBProvider) AppendScanComplexField(list *[]interface{})
func (*MysqlDBProvider) Close ¶
func (this *MysqlDBProvider) Close() error
func (*MysqlDBProvider) ConnectionDb ¶
func (this *MysqlDBProvider) ConnectionDb(dburl string) error
func (*MysqlDBProvider) CreateDefaultValue ¶
func (this *MysqlDBProvider) CreateDefaultValue(defaultValue interface{}) string
func (*MysqlDBProvider) CreateForeignKey ¶
func (*MysqlDBProvider) CreatePrimaryKey ¶
func (*MysqlDBProvider) CreateSqlTypeByLength ¶
func (*MysqlDBProvider) CreateTable ¶
func (*MysqlDBProvider) DropTable ¶
func (this *MysqlDBProvider) DropTable(tableName string) (sql.Result, error)
func (*MysqlDBProvider) ExecuteSQL ¶
func (*MysqlDBProvider) GetCurrentSerialValue ¶
func (this *MysqlDBProvider) GetCurrentSerialValue(tableName string, columnName string, ts *Trans) int64
func (*MysqlDBProvider) GetDBBoolType ¶
func (this *MysqlDBProvider) GetDBBoolType() string
func (*MysqlDBProvider) GetDBByteArrayType ¶
func (this *MysqlDBProvider) GetDBByteArrayType(length int) string
func (*MysqlDBProvider) GetDBComplex128Type ¶
func (this *MysqlDBProvider) GetDBComplex128Type() string
func (*MysqlDBProvider) GetDBComplex64Type ¶
func (this *MysqlDBProvider) GetDBComplex64Type() string
func (*MysqlDBProvider) GetDBFloat32Type ¶
func (this *MysqlDBProvider) GetDBFloat32Type() string
func (*MysqlDBProvider) GetDBFloat64Type ¶
func (this *MysqlDBProvider) GetDBFloat64Type() string
func (*MysqlDBProvider) GetDBInt16Type ¶
func (this *MysqlDBProvider) GetDBInt16Type() string
func (*MysqlDBProvider) GetDBInt32Type ¶
func (this *MysqlDBProvider) GetDBInt32Type() string
func (*MysqlDBProvider) GetDBInt64Type ¶
func (this *MysqlDBProvider) GetDBInt64Type() string
func (*MysqlDBProvider) GetDBInt8Type ¶
func (this *MysqlDBProvider) GetDBInt8Type() string
func (*MysqlDBProvider) GetDBIntType ¶
func (this *MysqlDBProvider) GetDBIntType() string
func (*MysqlDBProvider) GetDBStringType ¶
func (this *MysqlDBProvider) GetDBStringType(length int) string
func (*MysqlDBProvider) GetDBTimeType ¶
func (this *MysqlDBProvider) GetDBTimeType() string
func (*MysqlDBProvider) GetDBUint16Type ¶
func (this *MysqlDBProvider) GetDBUint16Type() string
func (*MysqlDBProvider) GetDBUint32Type ¶
func (this *MysqlDBProvider) GetDBUint32Type() string
func (*MysqlDBProvider) GetDBUint64Type ¶
func (this *MysqlDBProvider) GetDBUint64Type() string
func (*MysqlDBProvider) GetDBUint8Type ¶
func (this *MysqlDBProvider) GetDBUint8Type() string
func (*MysqlDBProvider) GetDBUintType ¶
func (this *MysqlDBProvider) GetDBUintType() string
func (*MysqlDBProvider) GetInsertByteDataSql ¶
func (this *MysqlDBProvider) GetInsertByteDataSql(byteval []byte) string
func (*MysqlDBProvider) GetInsertDBComplex128Sql ¶
func (this *MysqlDBProvider) GetInsertDBComplex128Sql(val complex128) string
func (*MysqlDBProvider) GetInsertDBComplex64Sql ¶
func (this *MysqlDBProvider) GetInsertDBComplex64Sql(val complex128) string
func (*MysqlDBProvider) GetInsertDBTimeSql ¶
func (this *MysqlDBProvider) GetInsertDBTimeSql(ti time.Time) string
func (*MysqlDBProvider) LimitSql ¶
func (this *MysqlDBProvider) LimitSql(limit int) string
func (*MysqlDBProvider) PrepareExecuteSQL ¶
func (this *MysqlDBProvider) PrepareExecuteSQL(sql string, parameter []interface{}, ts *Trans)
func (*MysqlDBProvider) SetMaxConnection ¶
func (this *MysqlDBProvider) SetMaxConnection(max int)
func (*MysqlDBProvider) SetMinConnection ¶
func (this *MysqlDBProvider) SetMinConnection(max int)
func (*MysqlDBProvider) TableExistsInDB ¶
func (this *MysqlDBProvider) TableExistsInDB(tableName string) (bool, error)
type PostgresqlDBProvider ¶
type PostgresqlDBProvider struct {
// contains filtered or unexported fields
}
func (*PostgresqlDBProvider) AppendScanComplexField ¶
func (this *PostgresqlDBProvider) AppendScanComplexField(list *[]interface{})
func (*PostgresqlDBProvider) Close ¶
func (this *PostgresqlDBProvider) Close() error
func (*PostgresqlDBProvider) ConnectionDb ¶
func (this *PostgresqlDBProvider) ConnectionDb(dburl string) error
func (*PostgresqlDBProvider) CreateDefaultValue ¶
func (this *PostgresqlDBProvider) CreateDefaultValue(defaultValue interface{}) string
func (*PostgresqlDBProvider) CreateForeignKey ¶
func (*PostgresqlDBProvider) CreatePrimaryKey ¶
func (*PostgresqlDBProvider) CreateSqlTypeByLength ¶
func (*PostgresqlDBProvider) CreateTable ¶
func (*PostgresqlDBProvider) DropTable ¶
func (this *PostgresqlDBProvider) DropTable(tableName string) (sql.Result, error)
func (*PostgresqlDBProvider) ExecuteSQL ¶
func (*PostgresqlDBProvider) GetCurrentSerialValue ¶
func (this *PostgresqlDBProvider) GetCurrentSerialValue(tableName string, columnName string, ts *Trans) int64
func (*PostgresqlDBProvider) GetDBBoolType ¶
func (this *PostgresqlDBProvider) GetDBBoolType() string
func (*PostgresqlDBProvider) GetDBByteArrayType ¶
func (this *PostgresqlDBProvider) GetDBByteArrayType(length int) string
func (*PostgresqlDBProvider) GetDBComplex128Type ¶
func (this *PostgresqlDBProvider) GetDBComplex128Type() string
func (*PostgresqlDBProvider) GetDBComplex64Type ¶
func (this *PostgresqlDBProvider) GetDBComplex64Type() string
func (*PostgresqlDBProvider) GetDBFloat32Type ¶
func (this *PostgresqlDBProvider) GetDBFloat32Type() string
func (*PostgresqlDBProvider) GetDBFloat64Type ¶
func (this *PostgresqlDBProvider) GetDBFloat64Type() string
func (*PostgresqlDBProvider) GetDBInt16Type ¶
func (this *PostgresqlDBProvider) GetDBInt16Type() string
func (*PostgresqlDBProvider) GetDBInt32Type ¶
func (this *PostgresqlDBProvider) GetDBInt32Type() string
func (*PostgresqlDBProvider) GetDBInt64Type ¶
func (this *PostgresqlDBProvider) GetDBInt64Type() string
func (*PostgresqlDBProvider) GetDBInt8Type ¶
func (this *PostgresqlDBProvider) GetDBInt8Type() string
func (*PostgresqlDBProvider) GetDBIntType ¶
func (this *PostgresqlDBProvider) GetDBIntType() string
func (*PostgresqlDBProvider) GetDBStringType ¶
func (this *PostgresqlDBProvider) GetDBStringType(length int) string
func (*PostgresqlDBProvider) GetDBTimeType ¶
func (this *PostgresqlDBProvider) GetDBTimeType() string
func (*PostgresqlDBProvider) GetDBUint16Type ¶
func (this *PostgresqlDBProvider) GetDBUint16Type() string
func (*PostgresqlDBProvider) GetDBUint32Type ¶
func (this *PostgresqlDBProvider) GetDBUint32Type() string
func (*PostgresqlDBProvider) GetDBUint64Type ¶
func (this *PostgresqlDBProvider) GetDBUint64Type() string
func (*PostgresqlDBProvider) GetDBUint8Type ¶
func (this *PostgresqlDBProvider) GetDBUint8Type() string
func (*PostgresqlDBProvider) GetDBUintType ¶
func (this *PostgresqlDBProvider) GetDBUintType() string
func (*PostgresqlDBProvider) GetInsertByteDataSql ¶
func (this *PostgresqlDBProvider) GetInsertByteDataSql(byteval []byte) string
func (*PostgresqlDBProvider) GetInsertDBComplex128Sql ¶
func (this *PostgresqlDBProvider) GetInsertDBComplex128Sql(val complex128) string
func (*PostgresqlDBProvider) GetInsertDBComplex64Sql ¶
func (this *PostgresqlDBProvider) GetInsertDBComplex64Sql(val complex128) string
func (*PostgresqlDBProvider) GetInsertDBTimeSql ¶
func (this *PostgresqlDBProvider) GetInsertDBTimeSql(ti time.Time) string
func (*PostgresqlDBProvider) LimitSql ¶
func (this *PostgresqlDBProvider) LimitSql(limit int) string
func (*PostgresqlDBProvider) PrepareExecuteSQL ¶
func (this *PostgresqlDBProvider) PrepareExecuteSQL(sql string, parameter []interface{}, ts *Trans)
func (*PostgresqlDBProvider) SetMaxConnection ¶
func (this *PostgresqlDBProvider) SetMaxConnection(max int)
func (*PostgresqlDBProvider) SetMinConnection ¶
func (this *PostgresqlDBProvider) SetMinConnection(max int)
func (*PostgresqlDBProvider) TableExistsInDB ¶
func (this *PostgresqlDBProvider) TableExistsInDB(tableName string) (bool, error)
type RelationInfo ¶
type RelationInfo struct { DbTableName string RelationType DbRelationType ColumnName string ReferencedColumnName string StructName string }
type Trans ¶
type Trans struct {
// contains filtered or unexported fields
}
func (*Trans) DeleteWhere ¶
func (this *Trans) DeleteWhere(structVal interface{}) *DbSqlBuilder
func (*Trans) DeleteWithSql ¶
func (*Trans) ExecuteWithSql ¶
func (*Trans) FetchLazyField ¶
func (*Trans) GetCurrentSerialValue ¶
func (*Trans) Insert ¶
func (this *Trans) Insert(structVal interface{}) *DbSqlBuilder
func (*Trans) InsertWithSql ¶
func (*Trans) Query ¶
func (this *Trans) Query(tableObj interface{}, fetchType FetchType, structName []string) *DbSqlBuilder
func (*Trans) SimpleQuery ¶
func (this *Trans) SimpleQuery(tableObj interface{}) *DbSqlBuilder
func (*Trans) UpdateWithSql ¶
func (*Trans) UpdateWithWhere ¶
func (this *Trans) UpdateWithWhere(structVal interface{}, fieldName []string) *DbSqlBuilder
Click to show internal directories.
Click to hide internal directories.