Documentation ¶
Index ¶
- Variables
- func GetDbType(dbName string) string
- func ParseAstValue(ctx context.Context, value ast.Value, vars map[string]interface{}) (interface{}, error)
- type GraphqlResult
- type MssqlSqlMaker
- func (mr *MssqlSqlMaker) AddLimitSkipClause(ctx context.Context, query string, limit int, skip int, globalLimit int) (newQuery string)
- func (mr *MssqlSqlMaker) CheckMe(ctx context.Context)
- func (mr *MssqlSqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
- func (pr *MssqlSqlMaker) GetTableMetaDataSQL(ctx context.Context) string
- type MysqlSqlMaker
- func (pr *MysqlSqlMaker) AddLimitSkipClause(ctx context.Context, query string, limit int, skip int, globalLimit int) (newQuery string)
- func (mr *MysqlSqlMaker) CheckMe(ctx context.Context)
- func (mr *MysqlSqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
- func (mr *MysqlSqlMaker) GetTableMetaDataSQL(ctx context.Context) string
- type PostgresSqlMaker
- func (pr *PostgresSqlMaker) AddLimitSkipClause(ctx context.Context, query string, limit int, skip int, globalLimit int) (newQuery string)
- func (pr *PostgresSqlMaker) CheckMe(ctx context.Context)
- func (pr *PostgresSqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
- func (pr *PostgresSqlMaker) GetPreparedQueryPlaceholder(ctx context.Context, rowCount int, colCount int, single bool) string
- func (pr *PostgresSqlMaker) GetTableMetaDataSQL(ctx context.Context) string
- func (pr *PostgresSqlMaker) MakeCreateTableSQL(ctx context.Context, tableName string, ...) (string, error)
- func (pr *PostgresSqlMaker) MakeDropTableSQL(ctx context.Context, tableName string) (string, error)
- type SqlMaker
- func (sqr *SqlMaker) AddLimitSkipClause(ctx context.Context, query string, limit int, skip int, globalLimit int) (newQuery string)
- func (sqr *SqlMaker) CheckMe(ctx context.Context)
- func (sqr *SqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
- func (sqr *SqlMaker) ExecuteMutationQuery(ctx context.Context, datasource *module_model.DataSource, myself SqlMakerI, ...) (res []map[string]interface{}, err error)
- func (sqr *SqlMaker) ExecutePreparedQuery(ctx context.Context, query string, datasource *module_model.DataSource) (res map[string]interface{}, err error)
- func (sqr *SqlMaker) ExecuteQuery(ctx context.Context, datasource *module_model.DataSource, ...) (res map[string]interface{}, err error)
- func (sqr *SqlMaker) ExecuteQueryForCsv(ctx context.Context, query string, datasource *module_model.DataSource, ...) (res map[string]interface{}, err error)
- func (sqr *SqlMaker) GetBaseSqlMaker(ctx context.Context) *SqlMaker
- func (sqr *SqlMaker) GetPreparedQueryPlaceholder(ctx context.Context, rowCount int, colCount int, single bool) string
- func (sqr *SqlMaker) GetReturnAlias(ctx context.Context) string
- func (sqr *SqlMaker) GetSqlResult(ctx context.Context) map[string]interface{}
- func (sqr *SqlMaker) GetTableList(ctx context.Context, query string, datasource *module_model.DataSource, ...) (err error)
- func (sqr *SqlMaker) GetTableMetaDataSQL(ctx context.Context) string
- func (sqr *SqlMaker) MakeCreateTableSQL(ctx context.Context, tableName string, ...) (string, error)
- func (sqr *SqlMaker) MakeDropTableSQL(ctx context.Context, tableName string) (string, error)
- func (sqr *SqlMaker) MakeQuery(ctx context.Context) (dbQuery string, err string)
- func (sqr *SqlMaker) RollbackQuery(ctx context.Context) (err error)
- type SqlMakerI
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDbSecurityRules = module_model.SecurityRules{security_rule.SecurityRule{"Allow", emptyCustomRule}, security_rule.SecurityRule{"Deny", emptyCustomRule}, security_rule.SecurityRule{"Allow", emptyCustomRule}, security_rule.SecurityRule{"Allow", emptyCustomRule}, security_rule.SecurityRule{"Allow", emptyCustomRule}, security_rule.SecurityRule{"Deny", emptyCustomRule}, security_rule.SecurityRule{"Allow", emptyCustomRule}, security_rule.SecurityRule{"Allow", emptyCustomRule}}
View Source
var DefaultDriverConfig = module_model.DriverConfig{10, 2, time.Hour}
View Source
var DefaultOtherConfig = module_model.OtherDbConfig{1000, 60, false}
Functions ¶
Types ¶
type GraphqlResult ¶
type GraphqlResult struct {
// contains filtered or unexported fields
}
type MssqlSqlMaker ¶
type MssqlSqlMaker struct {
SqlMaker
}
func (*MssqlSqlMaker) AddLimitSkipClause ¶
func (*MssqlSqlMaker) CheckMe ¶
func (mr *MssqlSqlMaker) CheckMe(ctx context.Context)
func (*MssqlSqlMaker) CreateConn ¶
func (mr *MssqlSqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
func (*MssqlSqlMaker) GetTableMetaDataSQL ¶
func (pr *MssqlSqlMaker) GetTableMetaDataSQL(ctx context.Context) string
type MysqlSqlMaker ¶
type MysqlSqlMaker struct {
SqlMaker
}
func (*MysqlSqlMaker) AddLimitSkipClause ¶
func (*MysqlSqlMaker) CheckMe ¶
func (mr *MysqlSqlMaker) CheckMe(ctx context.Context)
func (*MysqlSqlMaker) CreateConn ¶
func (mr *MysqlSqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
func (*MysqlSqlMaker) GetTableMetaDataSQL ¶
func (mr *MysqlSqlMaker) GetTableMetaDataSQL(ctx context.Context) string
type PostgresSqlMaker ¶
type PostgresSqlMaker struct {
SqlMaker
}
func (*PostgresSqlMaker) AddLimitSkipClause ¶
func (*PostgresSqlMaker) CheckMe ¶
func (pr *PostgresSqlMaker) CheckMe(ctx context.Context)
func (*PostgresSqlMaker) CreateConn ¶
func (pr *PostgresSqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
func (*PostgresSqlMaker) GetPreparedQueryPlaceholder ¶
func (*PostgresSqlMaker) GetTableMetaDataSQL ¶
func (pr *PostgresSqlMaker) GetTableMetaDataSQL(ctx context.Context) string
func (*PostgresSqlMaker) MakeCreateTableSQL ¶
func (pr *PostgresSqlMaker) MakeCreateTableSQL(ctx context.Context, tableName string, tableObj map[string]module_model.TableColsMetaData) (string, error)
func (*PostgresSqlMaker) MakeDropTableSQL ¶
type SqlMaker ¶
type SqlMaker struct { TestFlag bool QueryType string MainTableName string MainAliasName string TableNames map[string]string //AllTableNamesNew [][]tablesInQuery MainTableDB string WhereClause string SortClause string ColumnList string DBColumns string GroupList string JoinClause string ChildChange string Limit int Skip int HasAggregate bool DistinctResults bool //tempRA []map[int]int //tempA map[int]int //t int //InsertData []map[string]interface{} MutationRecords []module_model.MutationRecord TxnFlag bool MutationReturn module_model.MutationReturn MutationSelectQuery string MutationSelectCols string SingleTxn bool IsNested bool DBQuery string PreparedQuery bool // contains filtered or unexported fields }
func (*SqlMaker) AddLimitSkipClause ¶
func (*SqlMaker) CreateConn ¶
func (sqr *SqlMaker) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error
func (*SqlMaker) ExecuteMutationQuery ¶
func (sqr *SqlMaker) ExecuteMutationQuery(ctx context.Context, datasource *module_model.DataSource, myself SqlMakerI, mrm module_model.MutationResultMaker) (res []map[string]interface{}, err error)
func (*SqlMaker) ExecutePreparedQuery ¶
func (sqr *SqlMaker) ExecutePreparedQuery(ctx context.Context, query string, datasource *module_model.DataSource) (res map[string]interface{}, err error)
func (*SqlMaker) ExecuteQuery ¶
func (sqr *SqlMaker) ExecuteQuery(ctx context.Context, datasource *module_model.DataSource, qrm module_model.QueryResultMaker) (res map[string]interface{}, err error)
func (*SqlMaker) ExecuteQueryForCsv ¶
func (sqr *SqlMaker) ExecuteQueryForCsv(ctx context.Context, query string, datasource *module_model.DataSource, aliasName string) (res map[string]interface{}, err error)
func (*SqlMaker) GetBaseSqlMaker ¶
func (*SqlMaker) GetPreparedQueryPlaceholder ¶
func (*SqlMaker) GetSqlResult ¶
func (*SqlMaker) GetTableList ¶
func (sqr *SqlMaker) GetTableList(ctx context.Context, query string, datasource *module_model.DataSource, myself SqlMakerI) (err error)
func (*SqlMaker) GetTableMetaDataSQL ¶
func (*SqlMaker) MakeCreateTableSQL ¶
func (sqr *SqlMaker) MakeCreateTableSQL(ctx context.Context, tableName string, tableObj map[string]module_model.TableColsMetaData) (string, error)
func (*SqlMaker) MakeDropTableSQL ¶
type SqlMakerI ¶
type SqlMakerI interface { GetReturnAlias(ctx context.Context) string GetBaseSqlMaker(ctx context.Context) *SqlMaker //ProcessGraphQL(sel ast.Selection, vars map[string]interface{}, myself SqlMakerI, datasource *model.DataSource, ExecuteFlag bool) (res map[string]interface{}, query string, cols string , err error) //ProcessMutationGraphQL(sel ast.Selection, vars map[string]interface{}, myself SqlMakerI, datasource *model.DataSource, singleTxn bool, openTxn bool, closeTxn bool, query string, cols string) (res map[string]interface{}, err error) CheckMe(ctx context.Context) MakeQuery(ctx context.Context) (dbQuery string, err string) //MakeSQLQuery(sqlObject ql.SQLObject) (dbQuery string, err string) //MakeMutationQuery(idx int, docs []MutationRecord, tableName string) (dbQuery string) AddLimitSkipClause(ctx context.Context, query string, limit int, skip int, globalLimit int) (newQuery string) CreateConn(ctx context.Context, dataSource *module_model.DataSource) error ExecuteQuery(ctx context.Context, datasource *module_model.DataSource, qrm module_model.QueryResultMaker) (res map[string]interface{}, err error) ExecuteMutationQuery(ctx context.Context, datasource *module_model.DataSource, myself SqlMakerI, mrm module_model.MutationResultMaker) (res []map[string]interface{}, err error) ExecutePreparedQuery(ctx context.Context, query string, datasource *module_model.DataSource) (res map[string]interface{}, err error) ExecuteQueryForCsv(ctx context.Context, query string, datasource *module_model.DataSource, aliasName string) (res map[string]interface{}, err error) RollbackQuery(ctx context.Context) (err error) GetTableList(ctx context.Context, query string, datasource *module_model.DataSource, myself SqlMakerI) (err error) GetTableMetaDataSQL(ctx context.Context) string MakeCreateTableSQL(ctx context.Context, tableName string, tableObj map[string]module_model.TableColsMetaData) (string, error) MakeDropTableSQL(ctx context.Context, tableName string) (string, error) GetSqlResult(ctx context.Context) map[string]interface{} GetPreparedQueryPlaceholder(ctx context.Context, rowCount int, colCount int, single bool) string // contains filtered or unexported methods }
func GetSqlMaker ¶
Click to show internal directories.
Click to hide internal directories.