Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSelectQueryMap ¶
func BuildSelectQueryMap( driver string, tableFkConstraints map[string][]*sqlmanager_shared.ForeignConstraint, runConfigs []*tabledependency.RunConfig, subsetByForeignKeyConstraints bool, groupedColumnInfo map[string]map[string]*sqlmanager_shared.ColumnInfo, ) (map[string]map[tabledependency.RunType]string, error)
returns map of schema.table -> select query
Types ¶
type AliasTableInfo ¶
type AliasTableInfo struct {
Name string
}
func (*AliasTableInfo) GetName ¶
func (t *AliasTableInfo) GetName() string
func (*AliasTableInfo) GetSchema ¶
func (t *AliasTableInfo) GetSchema() *string
type ForeignKey ¶
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
func NewQueryBuilder ¶
func NewQueryBuilder(defaultSchema, driver string, subsetByForeignKeyConstraints bool, columnInfo map[string]map[string]*sqlmanager_shared.ColumnInfo) *QueryBuilder
func NewQueryBuilderFromSchemaDefinition ¶
func NewQueryBuilderFromSchemaDefinition( groupedColumnInfo map[string]map[string]*sqlmanager_shared.ColumnInfo, tableDependencies map[string]*TableConstraints, defaultSchema string, driver string, subsetByForeignKeyConstraints bool, ) *QueryBuilder
func (*QueryBuilder) AddTable ¶
func (qb *QueryBuilder) AddTable(table *TableInfo)
func (*QueryBuilder) AddWhereCondition ¶
func (qb *QueryBuilder) AddWhereCondition(schema, tableName, condition string, args ...any)
func (*QueryBuilder) BuildQuery ¶
func (qb *QueryBuilder) BuildQuery(schema, tableName string) (sqlstatement string, args []any, err error)
type TableConstraints ¶
type TableConstraints struct { ForeignKeys []*sqlmanager_shared.ForeignConstraint PrimaryKeys []*sqlmanager_shared.PrimaryKey }
type TableIdentity ¶
type TableInfo ¶
type TableInfo struct { Schema string Name string Columns []string PrimaryKeys []string ForeignKeys []*ForeignKey }
func (*TableInfo) GetIdentifierExpression ¶
func (t *TableInfo) GetIdentifierExpression() exp.IdentifierExpression
type WhereCondition ¶
Click to show internal directories.
Click to hide internal directories.