Versions in this module Expand all Collapse all v1 v1.0.0 May 16, 2020 Changes in this version + const CommonMaxBatch + const ComplexIdSeparator + const SQL_KIND_LIST + const SQL_KIND_ROW + const SQL_KIND_ROW_TEXT + const SQL_KIND_SINGLE + const SQL_KIND_TABLE + const SQL_KIND_TABLE_TEXT + const SQL_KIND_UPDATE + const SqlOracleLike + const SqlPostgresLike + const TypeBool + const TypeDate + const TypeInt + const TypeInt64 + const TypeString + var NullStringAsBytes = []byte("NULL") + func AddItemsToPool(db *sql.DB, sql string, cols int, pool [][]string) ([][]string, error) + func ConvertListToBooleanMap(ids []string) map[string]bool + func CreateTableByDefinition(db *sql.DB, def string) error + func ExecuteSqlData(db *sql.DB, data []byte) error + func ExecuteSqlFromFile(db *sql.DB, fileName string) error + func ExecuteSqlFromFolder(db *sql.DB, root string, sqlName string) error + func FindIntInIntArray(val int, data []int) int + func GetColumnListFromMetaByIndices(meta *TableMetaData, indices []int) string + func GetComplexIdForItem(row []string, ids []int) string + func GetConnectionType(connName string) int + func GetDB(connName string) (*sql.DB, string, error) + func GetDBConnection(props map[string]string, connName string) (*sql.DB, string, error) + func GetDBConnectionDirect(props map[string]string, connName string) (*sql.DB, string, error) + func GetDateNowFunction(sqlType int) string + func GetDefaultDbConnection() string + func GetExistingItems(meta *TableMetaData, ids [][]string, db *sql.DB) ([]string, error) + func GetIdsFromItems(meta *TableMetaData, items [][]string) [][]string + func GetMetaInfo(meta *TableMetaData) string + func GetPropertyGlobalDefinition(props map[string]string) string + func GetSingleValuesFromString(data [][]string, column int) []string + func GetTableNameColumnsFromDefinition(def string) (table string, columns []string, colDef []string, err error) + func GetTimestampLessDay(sqlType int) string + func OrderObjectsByHierarchy(objects [][]string, leftObjects map[string]bool, idCol int, depCols []int) ([][][]string, error) + func PlaceStringToSqlQuery(v string, tp string, b []byte, options int) ([]byte, error) + func PreExecute(properties map[string]string) error + func PreExecuteCsvFile(conn *sql.DB, name string, options int) error + func PreExecuteForNewerVersions(props map[string]string, db *sql.DB, folder string, sqlName string) error + func ReadGlobalDBProperty(props map[string]string, db *sql.DB, name string, defValue string) (string, error) + func ReadItemsInBatches(db *sql.DB, start string, finish string, ids []string, cols int) ([][]string, error) + func SavePortionOfItems(items [][]string, sqlTable string, conn *sql.DB, left map[string]bool, ...) (err error) + func SplitSqlSequences(data []byte) []string + func SqlInit(command string, ctx *dvmeta.RequestContext) ([]interface{}, bool) + func SqlRun(data []interface{}) bool + func SqlSingleValueByConnection(db *sql.DB, query string) (string, bool, error) + func SqlSingleValueByConnectionName(connName string, query string) (string, bool, error) + func SqlUpdateByConnection(db *sql.DB, query string) error + func SqlUpdateByConnectionName(connName string, query string) error + func WriteGlobalDBProperty(props map[string]string, db *sql.DB, name string, value string) error + type SqlAction struct + Columns []string + Db string + Empty int + Error string + Kind string + KindNo int + Query string + QueryOracle string + QueryPostgre string + Result string + type TableMetaData struct + Columns []string + Dependencies []int + Id string + IdColumns []int + MajorColumn int + Name string + QuoteColumns bool + Types []string + func ReadTableMetaData(table string, props map[string]string) (*TableMetaData, error)