database
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- Variables
- func ChangeColumnTypeViaAdd(conn Connection, table Table, col iop.Column) (err error)
- func CommonColumns(colNames1 []string, colNames2 []string) (commCols []string)
- func CopyFromAzure(conn Connection, tableFName, azPath string) (err error)
- func CopyFromS3(conn Connection, tableFName, s3Path string) (err error)
- func EnsureBinSQLite() (binPath string, err error)
- func GenerateAlterDDL(conn Connection, table Table, newColumns iop.Columns) (bool, error)
- func GetArrowDBCDriverType(driverName string) dbio.Type
- func GetOptimizeTableStatements(conn Connection, table *Table, newColumns iop.Columns, isTemp bool) (ok bool, ddlParts []string, err error)
- func GetQualifierQuote(dialect dbio.Type) string
- func InsertBatchStream(conn Connection, tx Transaction, tableFName string, ds *iop.Datastream) (count uint64, err error)
- func InsertStream(conn Connection, tx *BaseTransaction, tableFName string, ds *iop.Datastream) (count uint64, err error)
- func MakeDuckDbSecretProps(conn Connection, secretType iop.DuckDbSecretType) (secretProps map[string]string)
- func Merge(conn Connection, tx Transaction, sourceTable, targetTable string, ...) (count int64, err error)
- func NativeTypeToGeneral(name, dbType string, conn Connection) (colType iop.ColumnType)
- func PK(obj interface{}) (pk []string)
- func ParseColumnName(text string, dialect dbio.Type) (colName string, err error)
- func ParseSQLMultiStatements(sql string, Dialect ...dbio.Type) (sqls []string)
- func PrintSessionID(conn Connection)
- func QueryOperation(conn Connection, operation Operation, params map[string]any) (query string, err error)
- func SQLColumns(colTypes []ColumnType, conn Connection) (columns iop.Columns)
- func SplitTableFullName(tableName string) (string, string)
- func TestPermissions(conn Connection, tableName string) (err error)
- func TrimSQLComments(sql string) (string, error)
- func TruncateTable(conn Connection, tableName string) error
- func UID(obj interface{}) string
- type ArrowDBConn
- func (conn *ArrowDBConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *ArrowDBConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *ArrowDBConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *ArrowDBConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *ArrowDBConn) Close() error
- func (conn *ArrowDBConn) Connect(timeOut ...int) (err error)
- func (conn *ArrowDBConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *ArrowDBConn) GetNativeType(col iop.Column) (nativeType string, err error)
- func (conn *ArrowDBConn) GetSQLColumns(table Table) (columns iop.Columns, err error)
- func (conn *ArrowDBConn) GetTemplateValue(path string) string
- func (conn *ArrowDBConn) Init() error
- func (conn *ArrowDBConn) LoadTemplates() error
- func (conn *ArrowDBConn) Quote(field string) string
- func (conn *ArrowDBConn) StreamRowsContext(ctx context.Context, sql string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *ArrowDBConn) Template() dbio.Template
- func (conn *ArrowDBConn) Unquote(field string) string
- type AthenaConn
- func (conn *AthenaConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *AthenaConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *AthenaConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *AthenaConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *AthenaConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *AthenaConn) Close() error
- func (conn *AthenaConn) Connect(timeOut ...int) (err error)
- func (conn *AthenaConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *AthenaConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *AthenaConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *AthenaConn) GetDatabases() (iop.Dataset, error)
- func (conn *AthenaConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *AthenaConn) Init() error
- func (conn *AthenaConn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *AthenaConn) InsertStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *AthenaConn) LoadFromS3(tableFName, s3Path string, columns iop.Columns) (count uint64, err error)
- func (conn *AthenaConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *AthenaConn) StagingBucket() string
- func (conn *AthenaConn) StreamRowsContext(ctx context.Context, sql string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *AthenaConn) Unload(ctx *g.Context, tables ...Table) (s3Path string, err error)
- type AzureTableConn
- func (conn *AzureTableConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *AzureTableConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *AzureTableConn) Close() error
- func (conn *AzureTableConn) Connect(timeOut ...int) error
- func (conn *AzureTableConn) ExecContext(ctx context.Context, sql string, args ...any) (result sql.Result, err error)
- func (conn *AzureTableConn) GetCount(tableFName string) (int64, error)
- func (conn *AzureTableConn) GetSchemas() (data iop.Dataset, err error)
- func (conn *AzureTableConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *AzureTableConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *AzureTableConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *AzureTableConn) Init() error
- func (conn *AzureTableConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *AzureTableConn) StreamRowsContext(ctx context.Context, tableName string, Opts ...map[string]any) (ds *iop.Datastream, err error)
- func (conn *AzureTableConn) TableExists(table Table) (exists bool, err error)
- type AzureTableResult
- type BaseConn
- func (conn *BaseConn) AddMissingColumns(table Table, newCols iop.Columns) (ok bool, err error)
- func (conn *BaseConn) Base() *BaseConn
- func (conn *BaseConn) BaseURL() string
- func (conn *BaseConn) Begin(options ...*sql.TxOptions) (err error)
- func (conn *BaseConn) BeginContext(ctx context.Context, options ...*sql.TxOptions) (err error)
- func (conn *BaseConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *BaseConn) BulkExportFlowCSV(table Table) (df *iop.Dataflow, err error)
- func (conn *BaseConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *BaseConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *BaseConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BaseConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) string
- func (conn *BaseConn) CastColumnsForSelect(srcColumns iop.Columns, tgtColumns iop.Columns) []string
- func (conn *BaseConn) Close() error
- func (conn *BaseConn) Commit() (err error)
- func (conn *BaseConn) CompareChecksums(tableName string, columns iop.Columns) (err error)
- func (conn *BaseConn) ConnString() string
- func (conn *BaseConn) Connect(timeOut ...int) (err error)
- func (conn *BaseConn) Context() *g.Context
- func (conn *BaseConn) CreateTable(tableName string, cols iop.Columns, tableDDL string) (err error)
- func (conn *BaseConn) CreateTemporaryTable(tableName string, cols iop.Columns) (err error)
- func (conn *BaseConn) CurrentDatabase() (dbName string, err error)
- func (conn *BaseConn) Db() *sqlx.DB
- func (conn *BaseConn) DbX() *DbX
- func (conn *BaseConn) DropTable(tableNames ...string) (err error)
- func (conn *BaseConn) DropView(viewNames ...string) (err error)
- func (conn *BaseConn) Exec(sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *BaseConn) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (conn *BaseConn) ExecMulti(sqls ...string) (result sql.Result, err error)
- func (conn *BaseConn) ExecMultiContext(ctx context.Context, qs ...string) (result sql.Result, err error)
- func (conn *BaseConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *BaseConn) GenerateInsertStatement(tableName string, cols iop.Columns, numRows int) string
- func (conn *BaseConn) GenerateMergeConfig(srcTable string, tgtTable string, pkFields []string) (mc MergeConfig, err error)
- func (conn *BaseConn) GenerateMergeExpressions(srcTable string, tgtTable string, pkFields []string) (upsertMap map[string]string, err error)
- func (conn *BaseConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *BaseConn) GetAnalysis(analysisName string, values map[string]interface{}) (sql string, err error)
- func (conn *BaseConn) GetColumnStats(tableName string, fields ...string) (columns iop.Columns, err error)
- func (conn *BaseConn) GetColumns(tableFName string, fields ...string) (columns iop.Columns, err error)
- func (conn *BaseConn) GetColumnsFull(tableFName string) (iop.Dataset, error)
- func (conn *BaseConn) GetCount(tableFName string) (int64, error)
- func (conn *BaseConn) GetDDL(tableFName string) (string, error)
- func (conn *BaseConn) GetDatabases() (iop.Dataset, error)
- func (conn *BaseConn) GetGormConn(config *gorm.Config) (*gorm.DB, error)
- func (conn *BaseConn) GetIndexes(tableFName string) (iop.Dataset, error)
- func (conn *BaseConn) GetMaxValue(table Table, colName string) (value any, maxCol iop.Column, err error)
- func (conn *BaseConn) GetNativeType(col iop.Column) (nativeType string, err error)
- func (conn *BaseConn) GetObjects(schema string, objectType string) (iop.Dataset, error)
- func (conn *BaseConn) GetPrimaryKeys(tableFName string) (iop.Dataset, error)
- func (conn *BaseConn) GetProp(key ...string) string
- func (conn *BaseConn) GetSQLColumns(table Table) (columns iop.Columns, err error)
- func (conn *BaseConn) GetSchemas() (iop.Dataset, error)
- func (conn *BaseConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *BaseConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *BaseConn) GetTables(schema string) (iop.Dataset, error)
- func (conn *BaseConn) GetTablesAndViews(schema string) (iop.Dataset, error)
- func (conn *BaseConn) GetTemplateValue(path string) (value string)
- func (conn *BaseConn) GetType() dbio.Type
- func (conn *BaseConn) GetURL(newURL ...string) string
- func (conn *BaseConn) GetViews(schema string) (iop.Dataset, error)
- func (conn *BaseConn) Import(data iop.Dataset, tableName string) error
- func (conn *BaseConn) Info() (ci ConnInfo)
- func (conn *BaseConn) Init() (err error)
- func (conn *BaseConn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BaseConn) InsertStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BaseConn) Kill() error
- func (conn *BaseConn) LoadTemplates() (err error)
- func (conn *BaseConn) LogSQL(query string, args ...any)
- func (conn *BaseConn) Merge(srcTable string, tgtTable string, primKeys []string) (rowAffCnt int64, err error)
- func (conn *BaseConn) MustExec(sql string, args ...interface{}) (result sql.Result)
- func (conn *BaseConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (Transaction, error)
- func (conn *BaseConn) OptimizeTable(table *Table, newColumns iop.Columns, isTemp ...bool) (ok bool, err error)
- func (conn *BaseConn) Prepare(query string) (stmt *sql.Stmt, err error)
- func (conn *BaseConn) ProcessTemplate(level, text string, values map[string]interface{}) (sql string, err error)
- func (conn *BaseConn) PropArr() []string
- func (conn *BaseConn) PropArrExclude(exclude ...string) []string
- func (conn *BaseConn) Props() map[string]string
- func (conn *BaseConn) Query(sql string, options ...map[string]interface{}) (data iop.Dataset, err error)
- func (conn *BaseConn) QueryContext(ctx context.Context, sql string, options ...map[string]interface{}) (data iop.Dataset, err error)
- func (conn *BaseConn) Quote(field string) string
- func (conn *BaseConn) ReplaceProps(newProps map[string]string)
- func (conn *BaseConn) Rollback() (err error)
- func (conn *BaseConn) RunAnalysis(analysisName string, values map[string]interface{}) (data iop.Dataset, err error)
- func (conn *BaseConn) Schemata() Schemata
- func (conn *BaseConn) Self() Connection
- func (conn *BaseConn) SetProp(key string, val string)
- func (conn *BaseConn) StreamRecords(sql string) (<-chan map[string]interface{}, error)
- func (conn *BaseConn) StreamRows(sql string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *BaseConn) StreamRowsContext(ctx context.Context, query string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *BaseConn) SubmitTemplate(level string, templateMap map[string]string, name string, ...) (data iop.Dataset, err error)
- func (conn *BaseConn) SwapTable(srcTable string, tgtTable string) (err error)
- func (conn *BaseConn) TableExists(table Table) (exists bool, err error)
- func (conn *BaseConn) Template() dbio.Template
- func (conn *BaseConn) Tx() Transaction
- func (conn *BaseConn) Unquote(field string) string
- func (conn *BaseConn) UseADBC() bool
- func (conn *BaseConn) ValidateColumnNames(tgtCols iop.Columns, colNames []string) (newCols iop.Columns, err error)
- type BaseTransaction
- func (t *BaseTransaction) Commit() (err error)
- func (t *BaseTransaction) Connection() Connection
- func (t *BaseTransaction) Context() *g.Context
- func (t *BaseTransaction) DisableTrigger(tableName, triggerName string) (err error)
- func (t *BaseTransaction) EnableTrigger(tableName, triggerName string) (err error)
- func (t *BaseTransaction) Exec(sql string, args ...interface{}) (result sql.Result, err error)
- func (t *BaseTransaction) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (t *BaseTransaction) ExecMultiContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (t *BaseTransaction) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (t *BaseTransaction) InsertStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (t *BaseTransaction) Merge(sourceTable, targetTable string, pkFields []string) (count uint64, err error)
- func (t *BaseTransaction) Prepare(query string) (stmt *sql.Stmt, err error)
- func (t *BaseTransaction) QueryContext(ctx context.Context, q string, args ...interface{}) (result *sqlx.Rows, err error)
- func (t *BaseTransaction) Rollback() (err error)
- func (t *BaseTransaction) UpsertStream(tableFName string, ds *iop.Datastream, pk []string) (count uint64, err error)
- type BigQueryConn
- func (conn *BigQueryConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *BigQueryConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *BigQueryConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BigQueryConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *BigQueryConn) Close() error
- func (conn *BigQueryConn) Connect(timeOut ...int) error
- func (conn *BigQueryConn) CopyFromGCS(gcsURI string, table Table, dsColumns []iop.Column, format dbio.FileType) error
- func (conn *BigQueryConn) CopyFromLocal(localURI string, table Table, dsColumns iop.Columns, format dbio.FileType) error
- func (conn *BigQueryConn) CopyToGCS(table Table, gcsURI string, format dbio.FileType) error
- func (conn *BigQueryConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *BigQueryConn) ExportToGCS(sql string, gcsURI string, format dbio.FileType) error
- func (conn *BigQueryConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *BigQueryConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *BigQueryConn) GetDatabases() (iop.Dataset, error)
- func (conn *BigQueryConn) GetSchemas() (iop.Dataset, error)
- func (conn *BigQueryConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *BigQueryConn) Init() error
- func (conn *BigQueryConn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BigQueryConn) InsertStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BigQueryConn) LoadFromReader(table Table, reader io.Reader, dsColumns []iop.Column, format dbio.FileType) error
- func (conn *BigQueryConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *BigQueryConn) StreamRowsContext(ctx context.Context, sql string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *BigQueryConn) Unload(tables ...Table) (gsPath string, err error)
- type BigTableAction
- type BigTableConn
- func (conn *BigTableConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *BigTableConn) Close() error
- func (conn *BigTableConn) Connect(timeOut ...int) error
- func (conn *BigTableConn) ExecContext(ctx context.Context, payload string, args ...interface{}) (result sql.Result, err error)
- func (conn *BigTableConn) GetColumns(tableFName string, fields ...string) (columns iop.Columns, err error)
- func (conn *BigTableConn) GetColumnsFull(tableFName string) (iop.Dataset, error)
- func (conn *BigTableConn) GetSQLColumns(table Table) (columns iop.Columns, err error)
- func (conn *BigTableConn) GetSchemas() (iop.Dataset, error)
- func (conn *BigTableConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (schemata Schemata, err error)
- func (conn *BigTableConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *BigTableConn) GetViews(schema string) (data iop.Dataset, err error)
- func (conn *BigTableConn) Init() error
- func (conn *BigTableConn) InsertBatchStream(table string, ds *iop.Datastream) (count uint64, err error)
- func (conn *BigTableConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *BigTableConn) StreamRowsContext(ctx context.Context, table string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- type BigTableQuery
- type BlankTransaction
- func (t *BlankTransaction) Commit() (err error)
- func (t *BlankTransaction) Connection() Connection
- func (t *BlankTransaction) Context() *g.Context
- func (t *BlankTransaction) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (t *BlankTransaction) ExecMultiContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (t *BlankTransaction) Prepare(query string) (stmt *sql.Stmt, err error)
- func (t *BlankTransaction) QueryContext(ctx context.Context, q string, args ...interface{}) (result *sqlx.Rows, err error)
- func (t *BlankTransaction) Rollback() (err error)
- type Chunk
- type ClickhouseConn
- func (conn *ClickhouseConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *ClickhouseConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *ClickhouseConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *ClickhouseConn) ConnString() string
- func (conn *ClickhouseConn) Connect(timeOut ...int) (err error)
- func (conn *ClickhouseConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (ddl string, err error)
- func (conn *ClickhouseConn) GenerateInsertStatement(tableName string, cols iop.Columns, numRows int) string
- func (conn *ClickhouseConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *ClickhouseConn) GetNativeType(col iop.Column) (nativeType string, err error)
- func (conn *ClickhouseConn) Init() error
- func (conn *ClickhouseConn) Merge(srcTable string, tgtTable string, primKeys []string) (rowAffCnt int64, err error)
- func (conn *ClickhouseConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (Transaction, error)
- func (conn *ClickhouseConn) Version() int
- type ColumnType
- type ConnInfo
- type Connection
- type D1Conn
- func (conn *D1Conn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *D1Conn) Connect(timeOut ...int) (err error)
- func (conn *D1Conn) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (conn *D1Conn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *D1Conn) GetDatabases() (data iop.Dataset, err error)
- func (conn *D1Conn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *D1Conn) Init() error
- func (conn *D1Conn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *D1Conn) StreamRowsContext(ctx context.Context, query string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- type DataAnalyzer
- func (da *DataAnalyzer) AnalyzeColumns(sampleSize int, includeViews bool) (err error)
- func (da *DataAnalyzer) GetManyToMany(nonUniqueCols iop.Columns, asString bool) (err error)
- func (da *DataAnalyzer) GetOneToMany(uniqueCols, nonUniqueCols iop.Columns, asString bool) (err error)
- func (da *DataAnalyzer) GetOneToOne(uniqueCols iop.Columns, asString bool) (err error)
- func (da *DataAnalyzer) GetSchemata(force bool) (err error)
- func (da *DataAnalyzer) ProcessRelations() (err error)
- func (da *DataAnalyzer) ProcessRelationsInteger() (err error)
- func (da *DataAnalyzer) ProcessRelationsString() (err error)
- func (da *DataAnalyzer) WriteRelationsYaml(path string) (err error)
- type DataAnalyzerOptions
- type Database
- type DatabricksConn
- func (conn *DatabricksConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *DatabricksConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *DatabricksConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *DatabricksConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *DatabricksConn) Connect(timeOut ...int) error
- func (conn *DatabricksConn) CopyFromS3(tableFName, s3Path, fileFormat string) (err error)
- func (conn *DatabricksConn) CopyFromVolume(tableFName, volumePath string, fileFormat dbio.FileType, columns iop.Columns) error
- func (conn *DatabricksConn) CopyToS3(table Table) (s3Path string, err error)
- func (conn *DatabricksConn) CopyViaS3(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *DatabricksConn) CopyViaVolume(table Table, df *iop.Dataflow) (count uint64, err error)
- func (conn *DatabricksConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *DatabricksConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *DatabricksConn) GetColumnsFull(tableFName string) (data iop.Dataset, err error)
- func (conn *DatabricksConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *DatabricksConn) GetURL(newURL ...string) string
- func (conn *DatabricksConn) Init() error
- func (conn *DatabricksConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *DatabricksConn) UnloadViaVolume(tables ...Table) (filePath string, unloadedFiles int, err error)
- func (conn *DatabricksConn) VolumeDelete(volumePaths ...string) (err error)
- func (conn *DatabricksConn) VolumeGET(volumePath, folderPath, localFilePath string) error
- func (conn *DatabricksConn) VolumeList(volumePath string) (data iop.Dataset, err error)
- func (conn *DatabricksConn) VolumePUT(folderPath, localFilePath, volumePath string) error
- type DbX
- func (x *DbX) Delete(o interface{}) (cnt int, err error)
- func (x *DbX) Get(o interface{}, fields ...string) (err error)
- func (x *DbX) Insert(o interface{}, fields ...string) (err error)
- func (x *DbX) Merge(o interface{}, fields ...string) (cnt int, err error)
- func (x *DbX) Select(o interface{}, fields ...string) (err error)
- func (x *DbX) TableName(o interface{}) (name string)
- func (x *DbX) Update(o interface{}, fields ...string) (cnt int, err error)
- func (x *DbX) Where(where ...interface{}) *DbX
- type DuckDbConn
- func (conn *DuckDbConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *DuckDbConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *DuckDbConn) Close() (err error)
- func (conn *DuckDbConn) Connect(timeOut ...int) (err error)
- func (conn *DuckDbConn) DuckDb() *iop.DuckDb
- func (conn *DuckDbConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *DuckDbConn) ExecMultiContext(ctx context.Context, sqls ...string) (result sql.Result, err error)
- func (conn *DuckDbConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *DuckDbConn) GetURL(newURL ...string) string
- func (conn *DuckDbConn) Init() error
- func (conn *DuckDbConn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *DuckDbConn) InsertStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *DuckDbConn) StreamRowsContext(ctx context.Context, sql string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- type DuckLakeConn
- func (conn *DuckLakeConn) Close() error
- func (conn *DuckLakeConn) Connect(timeOut ...int) (err error)
- func (conn *DuckLakeConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *DuckLakeConn) GetURL(newURL ...string) string
- func (conn *DuckLakeConn) Init() error
- func (conn *DuckLakeConn) SubmitTemplate(level string, templateMap map[string]string, name string, ...) (data iop.Dataset, err error)
- type ElasticsearchConn
- func (conn *ElasticsearchConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *ElasticsearchConn) Close() error
- func (conn *ElasticsearchConn) Connect(timeOut ...int) error
- func (conn *ElasticsearchConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *ElasticsearchConn) GetSchemas() (data iop.Dataset, err error)
- func (conn *ElasticsearchConn) GetSchemata(level SchemataLevel, schema string, tables ...string) (schemata Schemata, err error)
- func (conn *ElasticsearchConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *ElasticsearchConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *ElasticsearchConn) Init() error
- func (conn *ElasticsearchConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *ElasticsearchConn) StreamRowsContext(ctx context.Context, tableName string, Opts ...map[string]any) (ds *iop.Datastream, err error)
- type ExasolConn
- func (conn *ExasolConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *ExasolConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *ExasolConn) Connect(timeOut ...int) error
- func (conn *ExasolConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *ExasolConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *ExasolConn) GetURL(newURL ...string) string
- func (conn *ExasolConn) Init() error
- func (conn *ExasolConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- type IcebergConn
- func (conn *IcebergConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *IcebergConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *IcebergConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *IcebergConn) Close() error
- func (conn *IcebergConn) Connect(timeOut ...int) (err error)
- func (conn *IcebergConn) CreateNamespaceIfNotExists(schema string) (err error)
- func (conn *IcebergConn) CreateTable(tableName string, cols iop.Columns, tableDDL string) (err error)
- func (conn *IcebergConn) DropTable(tableNames ...string) (err error)
- func (conn *IcebergConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *IcebergConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *IcebergConn) GetColumns(tableFName string, fields ...string) (columns iop.Columns, err error)
- func (conn *IcebergConn) GetCount(tableFName string) (count int64, err error)
- func (conn *IcebergConn) GetDataFiles(t Table) (dataFiles []iceberg.DataFile, err error)
- func (conn *IcebergConn) GetDatabases() (data iop.Dataset, err error)
- func (conn *IcebergConn) GetMaxValue(t Table, colName string) (value any, maxCol iop.Column, err error)
- func (conn *IcebergConn) GetSchemas() (data iop.Dataset, err error)
- func (conn *IcebergConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *IcebergConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *IcebergConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *IcebergConn) GetTablesAndViews(schema string) (data iop.Dataset, err error)
- func (conn *IcebergConn) GetViews(schema string) (data iop.Dataset, err error)
- func (conn *IcebergConn) Init() error
- func (conn *IcebergConn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *IcebergConn) InsertStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *IcebergConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *IcebergConn) StreamRowsContext(ctx context.Context, sql string, options ...map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *IcebergConn) SwapTable(srcTable string, tgtTable string) (err error)
- func (conn *IcebergConn) TableExists(t Table) (exists bool, err error)
- type IsolationLevel
- type ManualTransaction
- func (t *ManualTransaction) Commit() (err error)
- func (t *ManualTransaction) Context() *g.Context
- func (t *ManualTransaction) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (t *ManualTransaction) ExecMultiContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (t *ManualTransaction) Prepare(query string) (stmt *sql.Stmt, err error)
- func (t *ManualTransaction) QueryContext(ctx context.Context, q string, args ...interface{}) (result *sqlx.Rows, err error)
- func (t *ManualTransaction) Rollback() (err error)
- type MergeConfig
- type MergeStrategy
- type ModelDbX
- func (m *ModelDbX) Bind(bindFunc func(p interface{}) error, objPtr interface{}) (err error)
- func (m *ModelDbX) Delete(db *sqlx.DB) (err error)
- func (m *ModelDbX) Fields() (fields []string)
- func (m *ModelDbX) Get(db *sqlx.DB, fields ...string) (err error)
- func (m *ModelDbX) Insert(db *sqlx.DB, fields ...string) (err error)
- func (m *ModelDbX) Rec() map[string]interface{}
- func (m *ModelDbX) Select(db *sqlx.DB, objPtr interface{}, fields ...string) (err error)
- func (m *ModelDbX) TableName(objPtr interface{}) string
- func (m *ModelDbX) Update(db *sqlx.DB, fields ...string) (err error)
- func (m *ModelDbX) Values(fields []string) (values []interface{}, err error)
- func (m *ModelDbX) Where(where ...interface{}) *ModelDbX
- type MongoDBConn
- func (conn *MongoDBConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *MongoDBConn) Close() error
- func (conn *MongoDBConn) Connect(timeOut ...int) error
- func (conn *MongoDBConn) ExecContext(ctx context.Context, sql string, args ...any) (result sql.Result, err error)
- func (conn *MongoDBConn) GetSchemas() (data iop.Dataset, err error)
- func (conn *MongoDBConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *MongoDBConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *MongoDBConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *MongoDBConn) Init() error
- func (conn *MongoDBConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *MongoDBConn) StreamRowsContext(ctx context.Context, collectionName string, Opts ...map[string]any) (ds *iop.Datastream, err error)
- type MsFabricConn
- func (conn *MsFabricConn) AddMissingColumns(table Table, newCols iop.Columns) (ok bool, err error)
- func (conn *MsFabricConn) BulkExportFlow(table Table) (*iop.Dataflow, error)
- func (conn *MsFabricConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *MsFabricConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *MsFabricConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *MsFabricConn) Connect(timeOut ...int) (err error)
- func (conn *MsFabricConn) CopyFromOneLake(tableFName, oneLakePath string, columns iop.Columns, fileFormat dbio.FileType) (err error)
- func (conn *MsFabricConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *MsFabricConn) Init() error
- type MsSQLServerConn
- func (conn *MsSQLServerConn) BcpExport() (err error)
- func (conn *MsSQLServerConn) BcpImportFile(tableFName, filePath string) (count uint64, err error)
- func (conn *MsSQLServerConn) BcpImportFileParrallel(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *MsSQLServerConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *MsSQLServerConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *MsSQLServerConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *MsSQLServerConn) Close() error
- func (conn *MsSQLServerConn) ConnString() string
- func (conn *MsSQLServerConn) Connect(timeOut ...int) (err error)
- func (conn *MsSQLServerConn) CopyFromAzure(tableFName, azPath string) (count uint64, err error)
- func (conn *MsSQLServerConn) CopyViaAzure(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *MsSQLServerConn) FedAuth() string
- func (conn *MsSQLServerConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *MsSQLServerConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *MsSQLServerConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *MsSQLServerConn) GetURL(newURL ...string) string
- func (conn *MsSQLServerConn) Init() error
- func (conn *MsSQLServerConn) SubmitTemplate(level string, templateMap map[string]string, name string, ...) (data iop.Dataset, err error)
- type MySQLConn
- func (conn *MySQLConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *MySQLConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *MySQLConn) Close() error
- func (conn *MySQLConn) Connect(timeOut ...int) (err error)
- func (conn *MySQLConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *MySQLConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *MySQLConn) GetURL(newURL ...string) string
- func (conn *MySQLConn) Init() error
- func (conn *MySQLConn) LoadDataInFile(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *MySQLConn) LoadDataOutFile(ctx *g.Context, sql string) (stdOutReader io.Reader, err error)
- type Operation
- type OracleConn
- func (conn *OracleConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *OracleConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *OracleConn) ConnString() string
- func (conn *OracleConn) Connect(timeOut ...int) (err error)
- func (conn *OracleConn) ExecMultiContext(ctx context.Context, qs ...string) (result sql.Result, err error)
- func (conn *OracleConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *OracleConn) GenerateInsertStatement(tableName string, cols iop.Columns, numRows int) string
- func (conn *OracleConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *OracleConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *OracleConn) Init() error
- func (conn *OracleConn) SQLLoad(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *OracleConn) SubmitTemplate(level string, templateMap map[string]string, name string, ...) (data iop.Dataset, err error)
- func (conn *OracleConn) Version() int
- type Pool
- type PostgresConn
- func (conn *PostgresConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *PostgresConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *PostgresConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *PostgresConn) Close() error
- func (conn *PostgresConn) Connect(timeOut ...int) error
- func (conn *PostgresConn) CopyToStdout(ctx *g.Context, sql string) (stdOutReader io.Reader, err error)
- func (conn *PostgresConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (ddl string, err error)
- func (conn *PostgresConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *PostgresConn) Init() error
- type PrometheusConn
- func (conn *PrometheusConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *PrometheusConn) Close() error
- func (conn *PrometheusConn) Connect(timeOut ...int) error
- func (conn *PrometheusConn) ExecContext(ctx context.Context, sql string, args ...interface{}) (result sql.Result, err error)
- func (conn *PrometheusConn) GetSQLColumns(table Table) (columns iop.Columns, err error)
- func (conn *PrometheusConn) GetSchemas() (data iop.Dataset, err error)
- func (conn *PrometheusConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *PrometheusConn) GetTableColumns(table *Table, fields ...string) (columns iop.Columns, err error)
- func (conn *PrometheusConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *PrometheusConn) Init() error
- func (conn *PrometheusConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *PrometheusConn) StreamRowsChunked(queryContext *g.Context, query string, opts map[string]interface{}) (ds *iop.Datastream, err error)
- func (conn *PrometheusConn) StreamRowsContext(ctx context.Context, query string, Opts ...map[string]interface{}) (ds *iop.Datastream, err error)
- type ProtonConn
- func (conn *ProtonConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *ProtonConn) ConnString() string
- func (conn *ProtonConn) Connect(timeOut ...int) (err error)
- func (conn *ProtonConn) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (conn *ProtonConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *ProtonConn) GenerateInsertStatement(tableName string, cols iop.Columns, numRows int) string
- func (conn *ProtonConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *ProtonConn) GetCount(tableFName string) (int64, error)
- func (conn *ProtonConn) GetNativeType(col iop.Column) (nativeType string, err error)
- func (conn *ProtonConn) Init() error
- func (conn *ProtonConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (Transaction, error)
- type RedshiftConn
- func (conn *RedshiftConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *RedshiftConn) BulkExportStream(table Table) (ds *iop.Datastream, err error)
- func (conn *RedshiftConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *RedshiftConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *RedshiftConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *RedshiftConn) ConnString() string
- func (conn *RedshiftConn) CopyFromS3(tableFName, s3Path string, columns iop.Columns) (count uint64, err error)
- func (conn *RedshiftConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *RedshiftConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *RedshiftConn) Init() error
- func (conn *RedshiftConn) OptimizeTable(table *Table, newColumns iop.Columns, isTemp ...bool) (ok bool, err error)
- func (conn *RedshiftConn) Unload(ctx *g.Context, fileFormat dbio.FileType, tables ...Table) (s3Path string, err error)
- func (conn *RedshiftConn) WarnStlLoadErrors(err error)
- type Relation
- type Result
- type SQLiteConn
- func (conn *SQLiteConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *SQLiteConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *SQLiteConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *SQLiteConn) GetSchemata(level SchemataLevel, schemaName string, tableNames ...string) (Schemata, error)
- func (conn *SQLiteConn) GetURL(newURL ...string) string
- func (conn *SQLiteConn) Init() error
- type Schema
- type Schemata
- type SchemataLevel
- type SelectOptions
- type SnowflakeConn
- func (conn *SnowflakeConn) BulkExportFlow(table Table) (df *iop.Dataflow, err error)
- func (conn *SnowflakeConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *SnowflakeConn) BulkImportStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *SnowflakeConn) CastColumnForSelect(srcCol iop.Column, tgtCol iop.Column) (selectStr string)
- func (conn *SnowflakeConn) ConnString() string
- func (conn *SnowflakeConn) Connect(timeOut ...int) error
- func (conn *SnowflakeConn) CopyFromAzure(tableFName, azPath string) (err error)
- func (conn *SnowflakeConn) CopyFromS3(tableFName, s3Path string) (err error)
- func (conn *SnowflakeConn) CopyToAzure(tables ...Table) (azPath string, err error)
- func (conn *SnowflakeConn) CopyToS3(tables ...Table) (s3Path string, err error)
- func (conn *SnowflakeConn) CopyViaAWS(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *SnowflakeConn) CopyViaAzure(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *SnowflakeConn) CopyViaStage(table Table, df *iop.Dataflow) (count uint64, err error)
- func (conn *SnowflakeConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (sql string, err error)
- func (conn *SnowflakeConn) GenerateInsertStatement(tableName string, cols iop.Columns, numRows int) string
- func (conn *SnowflakeConn) GenerateMergeSQL(srcTable string, tgtTable string, pkFields []string) (sql string, err error)
- func (conn *SnowflakeConn) GetColumnsFull(tableFName string) (data iop.Dataset, err error)
- func (conn *SnowflakeConn) GetDatabases() (data iop.Dataset, err error)
- func (conn *SnowflakeConn) GetSchemas() (data iop.Dataset, err error)
- func (conn *SnowflakeConn) GetTables(schema string) (data iop.Dataset, err error)
- func (conn *SnowflakeConn) GetTablesAndViews(schema string) (iop.Dataset, error)
- func (conn *SnowflakeConn) GetViews(schema string) (data iop.Dataset, err error)
- func (conn *SnowflakeConn) Init() error
- func (conn *SnowflakeConn) StageGET(internalStagePath, folderPath string) (filePaths []string, err error)
- func (conn *SnowflakeConn) StagePUT(fileURI string, internalStagePath string) (err error)
- func (conn *SnowflakeConn) UnloadViaStage(format dbio.FileType, tables ...Table) (filePath string, unloaded int64, err error)
- type SqlServerLogger
- type StarRocksConn
- func (conn *StarRocksConn) AddMissingColumns(table Table, newCols iop.Columns) (ok bool, err error)
- func (conn *StarRocksConn) BulkImportFlow(tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *StarRocksConn) Connect(timeOut ...int) (err error)
- func (conn *StarRocksConn) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (conn *StarRocksConn) GenerateDDL(table Table, data iop.Dataset, temporary bool) (string, error)
- func (conn *StarRocksConn) GetDatabases() (data iop.Dataset, err error)
- func (conn *StarRocksConn) GetURL(newURL ...string) string
- func (conn *StarRocksConn) Init() error
- func (conn *StarRocksConn) InsertBatchStream(tableFName string, ds *iop.Datastream) (count uint64, err error)
- func (conn *StarRocksConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- func (conn *StarRocksConn) OptimizeTable(table *Table, newColumns iop.Columns, isTemp ...bool) (ok bool, err error)
- func (conn *StarRocksConn) StreamLoad(feURL, tableFName string, df *iop.Dataflow) (count uint64, err error)
- func (conn *StarRocksConn) WaitAlterTable(table Table) (err error)
- type StatFieldSQL
- type Table
- func (t *Table) AddPrimaryKeyToDDL(ddl string, columns iop.Columns) (string, error)
- func (t *Table) Clone() Table
- func (t *Table) ColumnsMap() map[string]iop.Column
- func (t *Table) DatabaseQ() string
- func (t *Table) FDQN() string
- func (t *Table) FullName() string
- func (t *Table) Indexes(columns iop.Columns) (indexes []TableIndex)
- func (t *Table) IsProcedural() bool
- func (t *Table) IsQuery() bool
- func (t *Table) MarshalJSON() ([]byte, error)
- func (t *Table) NameQ() string
- func (t *Table) SchemaQ() string
- func (t *Table) Select(Opts ...SelectOptions) (sql string)
- func (t *Table) SetKeys(sourcePKCols []string, updateCol string, tableKeys TableKeys) error
- type TableIndex
- type TableKeys
- type Transaction
- type TrinoConn
- func (conn *TrinoConn) ConnString() string
- func (conn *TrinoConn) ExecContext(ctx context.Context, q string, args ...interface{}) (result sql.Result, err error)
- func (conn *TrinoConn) Init() error
- func (conn *TrinoConn) NewTransaction(ctx context.Context, options ...*sql.TxOptions) (tx Transaction, err error)
- type User
- type WhereClause
Constants¶
const RelationManyToMany = "many_to_many"const RelationManyToOne = "many_to_one"const RelationOneToMany = "one_to_many"const RelationOneToOne = "one_to_one"Variables¶
var ChunkByColumn = func(connConnection, tableTable, cstring, pint) ([]Table,error) {return []Table{table},g.Error("please use the official sling-cli release for chunking columns")}
var ChunkByColumnRange = func(connConnection, tTable, cstring, cs, min, maxstring) ([]Chunk,error) {return []Chunk{},g.Error("please use the official sling-cli release for chunking")}
var ChunkByCount = func(connConnection, tTable, cstring, ccint, min, maxstring) ([]Chunk,string,error) {return []Chunk{}, "",g.Error("please use the official sling-cli release for chunking")}
var ChunkByExpression = func(connConnection, tTable, estring, ccint) ([]Chunk,error) {return []Chunk{},g.Error("please use the official sling-cli release for chunking")}
var Debug =falseDebug prints queries when true
var DuckDbFileCmd = map[string]*exec.Cmd{}var DuckDbFileContext = map[string]*g.Context{}// so that collision doesn't happenvar DuckDbMux =sync.Mutex{}var DuckDbUseTempFile =falsevar InferDBStream =falseInferDBStream may need to be `true`, since precision and scale is not guaranteed.If `false`, will use the database stream source schema
var SQLiteVersion = "3.41"var (// UseBulkExportFlowCSV to use BulkExportFlowCSVUseBulkExportFlowCSV =false)
Functions¶
funcChangeColumnTypeViaAdd¶
func ChangeColumnTypeViaAdd(connConnection, tableTable, coliop.Column) (errerror)
ChangeColumnTypeViaAdd swaps a new column with the old in order to change the typeneed to use this with snowflake when changing from date to string, or number to string
funcCommonColumns¶
CommonColumns return common columns
funcCopyFromAzure¶
func CopyFromAzure(connConnection, tableFName, azPathstring) (errerror)
CopyFromAzure uses the Snowflake COPY INTO Table command from Azurehttps://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html
funcCopyFromS3¶
func CopyFromS3(connConnection, tableFName, s3Pathstring) (errerror)
funcEnsureBinSQLite¶
EnsureBinSQLite ensures sqlite binary existsif missing, downloads and uses
funcGenerateAlterDDL¶
GenerateAlterDDL generate a DDL based on a dataset
funcGetArrowDBCDriverType¶added inv1.5.2
GetArrowDBCDriverType maps ADBC driver names to corresponding database typesThis allows using driver-specific SQL templates
funcGetOptimizeTableStatements¶added inv1.1.8
func GetOptimizeTableStatements(connConnection, table *Table, newColumnsiop.Columns, isTempbool) (okbool, ddlParts []string, errerror)
GetOptimizeTableStatements analyzes the table and alters the table withthe columns data type based on its analysis resultif table is missing, it is created with a new DDlHole in this: will truncate data points, since it is basedonly on new data being inserted... would need a completestats of the target table to properly optimize.
funcInsertBatchStream¶
func InsertBatchStream(connConnection, txTransaction, tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
funcInsertStream¶
func InsertStream(connConnection, tx *BaseTransaction, tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertStream inserts a stream
funcMakeDuckDbSecretProps¶added inv1.4.11
func MakeDuckDbSecretProps(connConnection, secretTypeiop.DuckDbSecretType) (secretProps map[string]string)
MakeDuckDbSecretProps convert conn props to duckdb secret props
funcMerge¶added inv1.4.20
func Merge(connConnection, txTransaction, sourceTable, targetTablestring, pkFields []string) (countint64, errerror)
Merge upserts from source table into target table
funcNativeTypeToGeneral¶
func NativeTypeToGeneral(name, dbTypestring, connConnection) (colTypeiop.ColumnType)
funcParseSQLMultiStatements¶
ParseSQLMultiStatements splits a sql text into statementstypically by a ';'
funcPrintSessionID¶added inv1.4.24
func PrintSessionID(connConnection)
funcQueryOperation¶added inv1.4.24
func QueryOperation(connConnection, operationOperation, params map[string]any) (querystring, errerror)
QueryOperation uses the operation input to render/generate a querybased on a template. This should be connection agnostic.
funcSQLColumns¶
func SQLColumns(colTypes []ColumnType, connConnection) (columnsiop.Columns)
SQLColumns returns the columns from database ColumnType
funcSplitTableFullName¶
SplitTableFullName retrusn the schema / table name
funcTestPermissions¶
func TestPermissions(connConnection, tableNamestring) (errerror)
TestPermissions tests the needed permissions in a given connection
funcTrimSQLComments¶added inv1.4.7
TrimSQLComments removes all SQL comments (line and block comments) from the input SQLLine comments start with -- and end with a newlineBlock comments start with /* and end with */
funcTruncateTable¶added inv1.4.14
func TruncateTable(connConnection, tableNamestring)error
Types¶
typeArrowDBConn¶added inv1.5.2
type ArrowDBConn struct {BaseConnURLstringConnadbc.Connection// contains filtered or unexported fields}ArrowDBConn is an Arrow FlightSQL connection
func (*ArrowDBConn)BulkExportFlow¶added inv1.5.2
func (conn *ArrowDBConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
BulkExportFlow exports data as a dataflow
func (*ArrowDBConn)BulkExportStream¶added inv1.5.2
func (conn *ArrowDBConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream streams the rows in bulk
func (*ArrowDBConn)BulkImportFlow¶added inv1.5.2
BulkImportFlow imports data from a dataflow using ADBC bulk ingestion
func (*ArrowDBConn)BulkImportStream¶added inv1.5.2
func (conn *ArrowDBConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream imports data from a datastream using ADBC bulk ingestion
func (*ArrowDBConn)Close¶added inv1.5.2
func (conn *ArrowDBConn) Close()error
Close closes the ADBC connection and database
func (*ArrowDBConn)Connect¶added inv1.5.2
func (conn *ArrowDBConn) Connect(timeOut ...int) (errerror)
Connect opens the ADBC connection
func (*ArrowDBConn)ExecContext¶added inv1.5.2
func (conn *ArrowDBConn) ExecContext(ctxcontext.Context, sqlstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext executes a SQL statement (read-only operations)
func (*ArrowDBConn)GetNativeType¶added inv1.5.2
func (conn *ArrowDBConn) GetNativeType(coliop.Column) (nativeTypestring, errerror)
GetNativeType returns the native column type from generic
func (*ArrowDBConn)GetSQLColumns¶added inv1.5.2
func (conn *ArrowDBConn) GetSQLColumns(tableTable) (columnsiop.Columns, errerror)
GetSQLColumns returns columns for a SQL query using Arrow schemaThis avoids wrapping with LIMIT which may not work for all database types
func (*ArrowDBConn)GetTemplateValue¶added inv1.5.2
func (conn *ArrowDBConn) GetTemplateValue(pathstring)string
GetTemplateValue returns the template value for the given pathIt first checks the driver-specific template, then falls back to ADBC template
func (*ArrowDBConn)Init¶added inv1.5.2
func (conn *ArrowDBConn) Init()error
Init initiates the connection
func (*ArrowDBConn)LoadTemplates¶added inv1.5.2
func (conn *ArrowDBConn) LoadTemplates()error
LoadTemplates loads the appropriate yaml templateFor ADBC, it merges the driver-specific template with the ADBC templateDriver template is base, ADBC template overrides for ADBC-specific behavior
func (*ArrowDBConn)Quote¶added inv1.5.2
func (conn *ArrowDBConn) Quote(fieldstring)string
func (*ArrowDBConn)StreamRowsContext¶added inv1.5.2
func (conn *ArrowDBConn) StreamRowsContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
StreamRowsContext streams query results as a datastream using Arrow record batches
func (*ArrowDBConn)Template¶added inv1.5.2
func (conn *ArrowDBConn) Template()dbio.Template
func (*ArrowDBConn)Unquote¶added inv1.5.2
func (conn *ArrowDBConn) Unquote(fieldstring)string
typeAthenaConn¶added inv1.4.7
type AthenaConn struct {BaseConnClient *athena.ClientURLstringDataLocationstringStagingLocationstring}AthenaConn is an Athena connection
func (*AthenaConn)BulkExportFlow¶added inv1.4.7
func (conn *AthenaConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
BulkExportFlow reads in bulk
func (*AthenaConn)BulkExportStream¶added inv1.4.7
func (conn *AthenaConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream reads in bulk
func (*AthenaConn)BulkImportFlow¶added inv1.4.7
BulkImportFlow inserts a flow of streams into a table.For athena we need to create CSVs in S3 and then use the COPY command.
func (*AthenaConn)BulkImportStream¶added inv1.4.7
func (conn *AthenaConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table.For athena we need to create CSVs in S3 and then use the COPY command.
func (*AthenaConn)CastColumnForSelect¶added inv1.4.7
CastColumnForSelect casts to the correct target column type
func (*AthenaConn)Close¶added inv1.4.7
func (conn *AthenaConn) Close()error
Close closes the connection
func (*AthenaConn)Connect¶added inv1.4.7
func (conn *AthenaConn) Connect(timeOut ...int) (errerror)
Connect connects to the database
func (*AthenaConn)ExecContext¶added inv1.4.7
func (conn *AthenaConn) ExecContext(ctxcontext.Context, sqlstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext executes the sql query
func (*AthenaConn)GenerateDDL¶added inv1.4.7
func (conn *AthenaConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*AthenaConn)GenerateMergeSQL¶added inv1.4.20
func (conn *AthenaConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*AthenaConn)GetDatabases¶added inv1.4.7
func (conn *AthenaConn) GetDatabases() (iop.Dataset,error)
GetDatabases returns databases for given connection
func (*AthenaConn)GetSchemata¶added inv1.4.7
func (conn *AthenaConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*AthenaConn)InsertBatchStream¶added inv1.4.7
func (conn *AthenaConn) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*AthenaConn)InsertStream¶added inv1.4.7
func (conn *AthenaConn) InsertStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertStream demonstrates loading data into a Athena table using a file on the local filesystem.
func (*AthenaConn)LoadFromS3¶added inv1.4.10
func (conn *AthenaConn) LoadFromS3(tableFName, s3Pathstring, columnsiop.Columns) (countuint64, errerror)
LoadFromS3 creates a temporary external table pointing to S3, then inserts into the target table
func (*AthenaConn)NewTransaction¶added inv1.4.7
func (conn *AthenaConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*AthenaConn)StagingBucket¶added inv1.4.10
func (conn *AthenaConn) StagingBucket()string
func (*AthenaConn)StreamRowsContext¶added inv1.4.7
func (conn *AthenaConn) StreamRowsContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
StreamRowsContext executes the query and streams the result into a datastream
typeAzureTableConn¶added inv1.4.16
type AzureTableConn struct {BaseConnURLstringClient *aztables.ServiceClientAccountNamestringAccountKeystringSASTokenstringConnectionStrstringTableNamestring// Specific table name for table-specific SAS tokens}AzureTableConn is an Azure Table connection
func (*AzureTableConn)BulkExportFlow¶added inv1.4.16
func (conn *AzureTableConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
func (*AzureTableConn)BulkImportFlow¶added inv1.4.16
func (conn *AzureTableConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow imports data into Azure Tables
func (*AzureTableConn)Close¶added inv1.4.16
func (conn *AzureTableConn) Close()error
func (*AzureTableConn)Connect¶added inv1.4.16
func (conn *AzureTableConn) Connect(timeOut ...int)error
Connect connects to the database
func (*AzureTableConn)ExecContext¶added inv1.4.16
func (*AzureTableConn)GetCount¶added inv1.4.16
func (conn *AzureTableConn) GetCount(tableFNamestring) (int64,error)
GetCount returns the row count for a table
func (*AzureTableConn)GetSchemas¶added inv1.4.16
func (conn *AzureTableConn) GetSchemas() (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*AzureTableConn)GetSchemata¶added inv1.4.16
func (conn *AzureTableConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*AzureTableConn)GetTableColumns¶added inv1.4.16
func (conn *AzureTableConn) GetTableColumns(table *Table, fields ...string) (columnsiop.Columns, errerror)
GetTableColumns returns columns for a table
func (*AzureTableConn)GetTables¶added inv1.4.16
func (conn *AzureTableConn) GetTables(schemastring) (dataiop.Dataset, errerror)
GetTables returns tables
func (*AzureTableConn)Init¶added inv1.4.16
func (conn *AzureTableConn) Init()error
Init initiates the object
func (*AzureTableConn)NewTransaction¶added inv1.4.16
func (conn *AzureTableConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*AzureTableConn)StreamRowsContext¶added inv1.4.16
func (conn *AzureTableConn) StreamRowsContext(ctxcontext.Context, tableNamestring, Opts ...map[string]any) (ds *iop.Datastream, errerror)
func (*AzureTableConn)TableExists¶added inv1.4.16
func (conn *AzureTableConn) TableExists(tableTable) (existsbool, errerror)
TableExists checks if a table exists
typeAzureTableResult¶added inv1.4.16
type AzureTableResult struct {// contains filtered or unexported fields}AzureTableResult implements sql.Result interface
func (*AzureTableResult)LastInsertId¶added inv1.4.16
func (r *AzureTableResult) LastInsertId() (int64,error)
func (*AzureTableResult)RowsAffected¶added inv1.4.16
func (r *AzureTableResult) RowsAffected() (int64,error)
typeBaseConn¶
type BaseConn struct {ConnectionURLstringTypedbio.Type// the type of database for sqlx: postgres, mysql, sqliteDataiop.DatasetLog []string// contains filtered or unexported fields}BaseConn is a database connection
func (*BaseConn)AddMissingColumns¶added inv1.1.8
func (*BaseConn)BeginContext¶
BeginContext starts a connection wide transaction
func (*BaseConn)BulkExportFlow¶
BulkExportFlow creates a dataflow from a sql query
func (*BaseConn)BulkExportFlowCSV¶
BulkExportFlowCSV creates a dataflow from a sql query, using CSVs
func (*BaseConn)BulkExportStream¶
func (conn *BaseConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream streams the rows in bulk
func (*BaseConn)BulkImportFlow¶
BulkImportFlow imports the streams rows in bulk concurrently using channels
func (*BaseConn)BulkImportStream¶
func (conn *BaseConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream import the stream rows in bulk
func (*BaseConn)CastColumnForSelect¶
CastColumnForSelect casts to the correct target column type
func (*BaseConn)CastColumnsForSelect¶
CastColumnsForSelect cast the source columns into the target Column types
func (*BaseConn)CompareChecksums¶
CompareChecksums compares the checksum values from the database sideto the checkum values from the StreamProcessor
func (*BaseConn)ConnString¶
ConnString returns the connection string needed for connection
func (*BaseConn)CreateTable¶
CreateTable creates a new table based on provided columns`tableName` should have 'schema.table' format
func (*BaseConn)CreateTemporaryTable¶
CreateTemporaryTable creates a temp table based on provided columns
func (*BaseConn)CurrentDatabase¶
CurrentDatabase returns the name of the current database
func (*BaseConn)ExecContext¶
func (conn *BaseConn) ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*BaseConn)ExecMultiContext¶
func (conn *BaseConn) ExecMultiContext(ctxcontext.Context, qs ...string) (resultsql.Result, errerror)
ExecMultiContext runs multiple sql queries with context, returns `error`
func (*BaseConn)GenerateDDL¶
GenerateDDL genrate a DDL based on a dataset
func (*BaseConn)GenerateInsertStatement¶
GenerateInsertStatement returns the proper INSERT statement
func (*BaseConn)GenerateMergeConfig¶added inv1.4.20
func (conn *BaseConn) GenerateMergeConfig(srcTablestring, tgtTablestring, pkFields []string) (mcMergeConfig, errerror)
GenerateMergeConfig returns the merge config
func (*BaseConn)GenerateMergeExpressions¶added inv1.4.20
func (conn *BaseConn) GenerateMergeExpressions(srcTablestring, tgtTablestring, pkFields []string) (upsertMap map[string]string, errerror)
GenerateMergeExpressions returns a map with needed expressions
func (*BaseConn)GenerateMergeSQL¶added inv1.4.20
func (conn *BaseConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL returns a sql for upsert
func (*BaseConn)GetAnalysis¶
func (conn *BaseConn) GetAnalysis(analysisNamestring, values map[string]interface{}) (sqlstring, errerror)
GetAnalysis runs an analysis
func (*BaseConn)GetColumnStats¶
func (conn *BaseConn) GetColumnStats(tableNamestring, fields ...string) (columnsiop.Columns, errerror)
GetColumnStats analyzes the table and returns the column statistics
func (*BaseConn)GetColumns¶
func (*BaseConn)GetColumnsFull¶
GetColumnsFull returns columns for given table. `tableName` shouldinclude schema and table, example: `schema1.table2`fields should be `schema_name|table_name|table_type|column_name|data_type|column_id`
func (*BaseConn)GetDatabases¶
GetDatabases returns databases for given connection
func (*BaseConn)GetGormConn¶
GetGormConn returns the gorm db connection
func (*BaseConn)GetIndexes¶
GetIndexes returns indexes for given table.
func (*BaseConn)GetMaxValue¶added inv1.4.10
GetMaxValue get the max value of a column
func (*BaseConn)GetNativeType¶
GetNativeType returns the native column type from generic
func (*BaseConn)GetObjects¶
GetObjects returns objects (tables or views) for given schema`objectType` can be either 'table', 'view' or 'all'
func (*BaseConn)GetPrimaryKeys¶
GetPrimaryKeys returns primark keys for given table.
func (*BaseConn)GetSQLColumns¶
GetSQLColumns return columns from a sql query result
func (*BaseConn)GetSchemas¶
GetSchemas returns schemas
func (*BaseConn)GetSchemata¶
func (conn *BaseConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*BaseConn)GetTableColumns¶
func (conn *BaseConn) GetTableColumns(table *Table, fields ...string) (columnsiop.Columns, errerror)
GetColumns returns columns for given table. `tableFName` shouldinclude schema and table, example: `schema1.table2`fields should be `column_name|data_type`
func (*BaseConn)GetTablesAndViews¶added inv1.2.19
GetTablesAndViews returns tables/views for given schema
func (*BaseConn)GetTemplateValue¶
GetTemplateValue returns the value of the path
func (*BaseConn)InsertBatchStream¶
func (conn *BaseConn) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*BaseConn)InsertStream¶
InsertStream inserts a stream into a table
func (*BaseConn)LoadTemplates¶
LoadTemplates loads the appropriate yaml template
func (*BaseConn)Merge¶added inv1.4.20
func (conn *BaseConn) Merge(srcTablestring, tgtTablestring, primKeys []string) (rowAffCntint64, errerror)
Merge inserts / updates from a srcTable into a target table.Assuming the srcTable has some or all of the tgtTable fields with matching types
func (*BaseConn)MustExec¶
MustExec execs the query using e and panics if there was an error.Any placeholder parameters are replaced with supplied args.
func (*BaseConn)NewTransaction¶
func (conn *BaseConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (Transaction,error)
NewTransaction creates a new transaction
func (*BaseConn)OptimizeTable¶
func (*BaseConn)ProcessTemplate¶
func (conn *BaseConn) ProcessTemplate(level, textstring, values map[string]interface{}) (sqlstring, errerror)
ProcessTemplate processes a template SQL text at a given level
func (*BaseConn)PropArrExclude¶added inv1.2.14
func (*BaseConn)Query¶
func (conn *BaseConn) Query(sqlstring, options ...map[string]interface{}) (dataiop.Dataset, errerror)
Query runs a sql query, returns `result`, `error`
func (*BaseConn)QueryContext¶
func (conn *BaseConn) QueryContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (dataiop.Dataset, errerror)
QueryContext runs a sql query with ctx, returns `result`, `error`
func (*BaseConn)ReplaceProps¶added inv1.2.16
ReplaceProps used when reusing a connectionsince the provided props can change, this is usedto delete old original props and set new ones
func (*BaseConn)RunAnalysis¶
func (conn *BaseConn) RunAnalysis(analysisNamestring, values map[string]interface{}) (dataiop.Dataset, errerror)
RunAnalysis runs an analysis
func (*BaseConn)Self¶
func (conn *BaseConn) Self()Connection
Self returns the respective connection InstanceThis is useful to refer back to a subclass methodfrom the superclass level. (Aka overloading)
func (*BaseConn)StreamRecords¶
StreamRecords the records of a sql query, returns `result`, `error`
func (*BaseConn)StreamRows¶
func (conn *BaseConn) StreamRows(sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
StreamRows the rows of a sql query, returns `result`, `error`
func (*BaseConn)StreamRowsContext¶
func (conn *BaseConn) StreamRowsContext(ctxcontext.Context, querystring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
StreamRowsContext streams the rows of a sql query with context, returns `result`, `error`
func (*BaseConn)SubmitTemplate¶added inv1.2.4
func (*BaseConn)TableExists¶added inv1.4.10
TableExists returns true if the table exists
func (*BaseConn)ValidateColumnNames¶
func (conn *BaseConn) ValidateColumnNames(tgtColsiop.Columns, colNames []string) (newColsiop.Columns, errerror)
ValidateColumnNames verifies that source fields are present in the target tableIt will return quoted field names as `newColNames`, the same length as `colNames`
typeBaseTransaction¶
type BaseTransaction struct {Tx *sqlx.TxConnConnection// contains filtered or unexported fields}BaseTransaction is a database transaction
func (*BaseTransaction)Commit¶
func (t *BaseTransaction) Commit() (errerror)
func (*BaseTransaction)Connection¶
func (t *BaseTransaction) Connection()Connection
Connection return the connection
func (*BaseTransaction)Context¶
func (t *BaseTransaction) Context() *g.Context
Commit commits connection wide transaction
func (*BaseTransaction)DisableTrigger¶
func (t *BaseTransaction) DisableTrigger(tableName, triggerNamestring) (errerror)
DisableTrigger disables a trigger
func (*BaseTransaction)EnableTrigger¶
func (t *BaseTransaction) EnableTrigger(tableName, triggerNamestring) (errerror)
EnableTrigger enables a trigger
func (*BaseTransaction)Exec¶
func (t *BaseTransaction) Exec(sqlstring, args ...interface{}) (resultsql.Result, errerror)
Exec runs a sql query, returns `error`
func (*BaseTransaction)ExecContext¶
func (t *BaseTransaction) ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*BaseTransaction)ExecMultiContext¶
func (t *BaseTransaction) ExecMultiContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecMultiContext runs multiple sql queries with context, returns `error`
func (*BaseTransaction)InsertBatchStream¶
func (t *BaseTransaction) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*BaseTransaction)InsertStream¶
func (t *BaseTransaction) InsertStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertStream inserts a stream into a table
func (*BaseTransaction)Merge¶added inv1.4.20
func (t *BaseTransaction) Merge(sourceTable, targetTablestring, pkFields []string) (countuint64, errerror)
Merge does an upsert from source table into target table
func (*BaseTransaction)Prepare¶
func (t *BaseTransaction) Prepare(querystring) (stmt *sql.Stmt, errerror)
Prepare prepares the statement
func (*BaseTransaction)QueryContext¶
func (t *BaseTransaction) QueryContext(ctxcontext.Context, qstring, args ...interface{}) (result *sqlx.Rows, errerror)
QueryContext queries rows
func (*BaseTransaction)Rollback¶
func (t *BaseTransaction) Rollback() (errerror)
Rollback rolls back connection wide transaction
func (*BaseTransaction)UpsertStream¶
func (t *BaseTransaction) UpsertStream(tableFNamestring, ds *iop.Datastream, pk []string) (countuint64, errerror)
UpsertStream inserts a stream into a table in batch
typeBigQueryConn¶
type BigQueryConn struct {BaseConnURLstringClient *bigquery.ClientProjectIDstringDatasetIDstringLocationstringDatasets []stringMuxsync.Mutex}BigQueryConn is a Google Big Query connection
func (*BigQueryConn)BulkExportFlow¶
func (conn *BigQueryConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
BulkExportFlow reads in bulk
func (*BigQueryConn)BulkImportFlow¶
func (conn *BigQueryConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow inserts a flow of streams into a table.For redshift we need to create CSVs in GCS and then use the COPY command.
func (*BigQueryConn)BulkImportStream¶
func (conn *BigQueryConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream demonstrates loading data into a BigQuery table using a file on the local filesystem.
func (*BigQueryConn)CastColumnForSelect¶
CastColumnForSelect casts to the correct target column type
func (*BigQueryConn)Connect¶
func (conn *BigQueryConn) Connect(timeOut ...int)error
Connect connects to the database
func (*BigQueryConn)CopyFromGCS¶
func (*BigQueryConn)CopyFromLocal¶
func (conn *BigQueryConn) CopyFromLocal(localURIstring, tableTable, dsColumnsiop.Columns, formatdbio.FileType)error
CopyFromGCS into bigquery from google storage
func (*BigQueryConn)ExecContext¶
func (*BigQueryConn)ExportToGCS¶
CopyToGCS Copy table to gc storage
func (*BigQueryConn)GenerateDDL¶added inv1.1.4
func (conn *BigQueryConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*BigQueryConn)GenerateMergeSQL¶added inv1.4.20
func (conn *BigQueryConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*BigQueryConn)GetDatabases¶
func (conn *BigQueryConn) GetDatabases() (iop.Dataset,error)
GetDatabases returns databases
func (*BigQueryConn)GetSchemas¶
func (conn *BigQueryConn) GetSchemas() (iop.Dataset,error)
GetSchemas returns schemas
func (*BigQueryConn)GetSchemata¶
func (conn *BigQueryConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*BigQueryConn)InsertBatchStream¶
func (conn *BigQueryConn) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*BigQueryConn)InsertStream¶
func (conn *BigQueryConn) InsertStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertStream demonstrates loading data into a BigQuery table using a file on the local filesystem.
func (*BigQueryConn)LoadFromReader¶added inv1.4.24
func (conn *BigQueryConn) LoadFromReader(tableTable, readerio.Reader, dsColumns []iop.Column, formatdbio.FileType)error
LoadFromReader demonstrates loading data into a BigQuery table using a file on the local filesystem.https://cloud.google.com/bigquery/docs/batch-loading-data#loading_data_from_local_files
func (*BigQueryConn)NewTransaction¶
func (conn *BigQueryConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*BigQueryConn)StreamRowsContext¶
func (conn *BigQueryConn) StreamRowsContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
typeBigTableAction¶
type BigTableActionstring
const BTCreateColumnFamilyBigTableAction = "create_column_family"const BTCreateTableBigTableAction = "create_table"const BTDeleteTableBigTableAction = "delete_table"const BTTableInfoBigTableAction = "table_info"typeBigTableConn¶
type BigTableConn struct {BaseConnURLstringClient *bigtable.ClientProjectIDstringInstanceIDstringLocationstring}BigTableConn is a Google Big Query connection
func (*BigTableConn)BulkExportFlow¶
func (conn *BigTableConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
func (*BigTableConn)Connect¶
func (conn *BigTableConn) Connect(timeOut ...int)error
Connect connects to the database
func (*BigTableConn)ExecContext¶
func (*BigTableConn)GetColumns¶
func (*BigTableConn)GetColumnsFull¶
func (conn *BigTableConn) GetColumnsFull(tableFNamestring) (iop.Dataset,error)
func (*BigTableConn)GetSQLColumns¶
func (conn *BigTableConn) GetSQLColumns(tableTable) (columnsiop.Columns, errerror)
GetTables returns tables for given schema
func (*BigTableConn)GetSchemas¶
func (conn *BigTableConn) GetSchemas() (iop.Dataset,error)
func (*BigTableConn)GetSchemata¶
func (conn *BigTableConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (schemataSchemata, errerror)
func (*BigTableConn)GetTables¶
func (conn *BigTableConn) GetTables(schemastring) (dataiop.Dataset, errerror)
func (*BigTableConn)GetViews¶
func (conn *BigTableConn) GetViews(schemastring) (dataiop.Dataset, errerror)
GetTables returns tables for given schema
func (*BigTableConn)InsertBatchStream¶
func (conn *BigTableConn) InsertBatchStream(tablestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*BigTableConn)NewTransaction¶
func (conn *BigTableConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*BigTableConn)StreamRowsContext¶
func (conn *BigTableConn) StreamRowsContext(ctxcontext.Context, tablestring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
typeBigTableQuery¶
type BigTableQuery struct {ActionBigTableAction `json:"action"`Tablestring `json:"table"`ColumnFamilies []string `json:"column_family"`}typeBlankTransaction¶
type BlankTransaction struct {ConnConnection// contains filtered or unexported fields}func (*BlankTransaction)Commit¶
func (t *BlankTransaction) Commit() (errerror)
func (*BlankTransaction)Connection¶
func (t *BlankTransaction) Connection()Connection
func (*BlankTransaction)Context¶
func (t *BlankTransaction) Context() *g.Context
func (*BlankTransaction)ExecContext¶
func (*BlankTransaction)ExecMultiContext¶
func (*BlankTransaction)Prepare¶
func (t *BlankTransaction) Prepare(querystring) (stmt *sql.Stmt, errerror)
func (*BlankTransaction)QueryContext¶
func (*BlankTransaction)Rollback¶
func (t *BlankTransaction) Rollback() (errerror)
typeChunk¶added inv1.4.14
typeClickhouseConn¶
ClickhouseConn is a Clikchouse connection
func (*ClickhouseConn)BulkExportStream¶added inv1.4.18
func (conn *ClickhouseConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream streams the rows in bulk
func (*ClickhouseConn)BulkImportStream¶
func (conn *ClickhouseConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table
func (*ClickhouseConn)CastColumnForSelect¶added inv1.5.1
func (conn *ClickhouseConn) CastColumnForSelect(srcColiop.Column, tgtColiop.Column) (selectStrstring)
CastColumnForSelect casts to the correct target column type
func (*ClickhouseConn)ConnString¶
func (conn *ClickhouseConn) ConnString()string
func (*ClickhouseConn)Connect¶added inv1.1.12
func (conn *ClickhouseConn) Connect(timeOut ...int) (errerror)
func (*ClickhouseConn)GenerateDDL¶added inv1.1.4
func (conn *ClickhouseConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (ddlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*ClickhouseConn)GenerateInsertStatement¶
func (conn *ClickhouseConn) GenerateInsertStatement(tableNamestring, colsiop.Columns, numRowsint)string
GenerateInsertStatement returns the proper INSERT statement
func (*ClickhouseConn)GenerateMergeSQL¶added inv1.4.20
func (conn *ClickhouseConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*ClickhouseConn)GetNativeType¶added inv1.2.15
func (conn *ClickhouseConn) GetNativeType(coliop.Column) (nativeTypestring, errerror)
func (*ClickhouseConn)Merge¶added inv1.4.21
func (conn *ClickhouseConn) Merge(srcTablestring, tgtTablestring, primKeys []string) (rowAffCntint64, errerror)
Merge inserts / updates from a srcTable into a target table.Assuming the srcTable has some or all of the tgtTable fields with matching types
func (*ClickhouseConn)NewTransaction¶
func (conn *ClickhouseConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (Transaction,error)
NewTransaction creates a new transaction
func (*ClickhouseConn)Version¶added inv1.4.21
func (conn *ClickhouseConn) Version()int
typeColumnType¶
type ColumnType struct {NamestringDatabaseTypeNamestringFetchedColumn *iop.ColumnLengthintPrecisionintScaleintNullableboolCT *sql.ColumnTypeSourcedbool}func (*ColumnType)IsSourced¶added inv1.3.5
func (ct *ColumnType) IsSourced()bool
typeConnection¶
type Connection interface {Base() *BaseConnBaseURL()stringBegin(options ...*sql.TxOptions)errorBeginContext(ctxcontext.Context, options ...*sql.TxOptions)errorBulkExportFlow(tableTable) (*iop.Dataflow,error)BulkExportStream(tableTable) (*iop.Datastream,error)BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)CastColumnForSelect(srcColumniop.Column, tgtColumniop.Column)stringCastColumnsForSelect(srcColumnsiop.Columns, tgtColumnsiop.Columns) []stringClose()errorCommit()errorCompareChecksums(tableNamestring, columnsiop.Columns) (errerror)Connect(timeOut ...int)errorConnString()stringContext() *g.ContextCreateTable(tableNamestring, colsiop.Columns, tableDDLstring) (errerror)CreateTemporaryTable(tableNamestring, colsiop.Columns) (errerror)CurrentDatabase() (string,error)Db() *sqlx.DBDbX() *DbXDropTable(...string)errorDropView(...string)errorExec(sqlstring, args ...interface{}) (resultsql.Result, errerror)ExecContext(ctxcontext.Context, sqlstring, args ...interface{}) (resultsql.Result, errerror)ExecMulti(sqls ...string) (resultsql.Result, errerror)ExecMultiContext(ctxcontext.Context, sqls ...string) (resultsql.Result, errerror)GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (string,error)GenerateInsertStatement(tableNamestring, colsiop.Columns, numRowsint)stringGenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)GetAnalysis(string, map[string]interface{}) (string,error)GetColumns(tableFNamestring, fields ...string) (iop.Columns,error)GetColumnsFull(string) (iop.Dataset,error)GetColumnStats(tableNamestring, fields ...string) (columnsiop.Columns, errerror)GetCount(string) (int64,error)GetDatabases() (iop.Dataset,error)GetMaxValue(tTable, colNamestring) (valueany, coliop.Column, errerror)GetDDL(string) (string,error)GetGormConn(config *gorm.Config) (*gorm.DB,error)GetIndexes(string) (iop.Dataset,error)GetNativeType(coliop.Column) (nativeTypestring, errerror)GetPrimaryKeys(string) (iop.Dataset,error)GetProp(...string)stringGetSchemas() (iop.Dataset,error)GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)GetSQLColumns(tableTable) (columnsiop.Columns, errerror)GetTableColumns(table *Table, fields ...string) (columnsiop.Columns, errerror)GetTablesAndViews(string) (iop.Dataset,error)GetTables(string) (iop.Dataset,error)GetTemplateValue(pathstring) (valuestring)GetType()dbio.TypeGetURL(newURL ...string)stringGetViews(string) (iop.Dataset,error)Info()ConnInfoInit()errorInsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)InsertStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)Kill()errorLoadTemplates()errorMustExec(sqlstring, args ...interface{}) (resultsql.Result)NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (Transaction,error)OptimizeTable(table *Table, columnsiop.Columns, isTemp ...bool) (okbool, errerror)Prepare(querystring) (stmt *sql.Stmt, errerror)ProcessTemplate(level, textstring, values map[string]interface{}) (sqlstring, errerror)Props() map[string]stringPropsArr() []stringQuery(sqlstring, options ...map[string]interface{}) (iop.Dataset,error)QueryContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (iop.Dataset,error)Quote(fieldstring)stringRenameTable(tablestring, newTablestring) (errerror)Rollback()errorRunAnalysis(string, map[string]interface{}) (iop.Dataset,error)Schemata()SchemataSelf()ConnectionSetProp(string,string)StreamRecords(sqlstring) (<-chan map[string]interface{},error)StreamRows(sqlstring, options ...map[string]interface{}) (*iop.Datastream,error)StreamRowsContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)SubmitTemplate(levelstring, templateMap map[string]string, namestring, values map[string]interface{}) (dataiop.Dataset, errerror)SwapTable(srcTablestring, tgtTablestring) (errerror)TableExists(tableTable) (existsbool, errerror)Template()dbio.TemplateTx()TransactionUnquote(string)stringMerge(srcTablestring, tgtTablestring, pkFields []string) (rowAffCntint64, errerror)ValidateColumnNames(tgtColsiop.Columns, colNames []string) (newColsiop.Columns, errerror)AddMissingColumns(tableTable, newColsiop.Columns) (okbool, errerror)UseADBC()bool}Connection is the Base interface for Connections
funcClone¶
func Clone(connConnection) (newConnConnection, errerror)
funcNewAdbcConn¶added inv1.5.2
func NewAdbcConn(parentConnConnection) (adbcConnConnection, errerror)
NewAdbcConn creates a new ADBC conn from a parent connconstructs the connection string with complete URIs/paths for each database type
funcNewConn¶
func NewConn(URLstring, props ...string) (Connection,error)
NewConn return the most proper connection for a given database
funcNewConnContext¶
NewConnContext return the most proper connection for a given database with contextprops are provided as `"Prop1=Value1", "Prop2=Value2", ...`
typeD1Conn¶added inv1.3.5
type D1Conn struct {SQLiteConnURLstringAccountIDstringDatabasestringUUIDstringAPITokenstring// contains filtered or unexported fields}D1Conn is a Cloudflare SQLite connection
func (*D1Conn)BulkImportStream¶added inv1.3.5
func (*D1Conn)ExecContext¶added inv1.3.5
func (conn *D1Conn) ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*D1Conn)GenerateMergeSQL¶added inv1.4.20
func (conn *D1Conn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*D1Conn)GetDatabases¶added inv1.4.6
GetDatabases returns databases for given connection
func (*D1Conn)GetSchemata¶added inv1.3.5
func (conn *D1Conn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*D1Conn)InsertBatchStream¶added inv1.3.5
func (*D1Conn)StreamRowsContext¶added inv1.3.5
typeDataAnalyzer¶
type DataAnalyzer struct {ConnConnectionSchemataSchemataColumnMap map[string]iop.ColumnRelationMap map[string]map[string]map[string]Relation// table > column A > column B > relationOptionsDataAnalyzerOptions}funcNewDataAnalyzer¶
func NewDataAnalyzer(connConnection, optsDataAnalyzerOptions) (da *DataAnalyzer, errerror)
func (*DataAnalyzer)AnalyzeColumns¶
func (da *DataAnalyzer) AnalyzeColumns(sampleSizeint, includeViewsbool) (errerror)
func (*DataAnalyzer)GetManyToMany¶
func (da *DataAnalyzer) GetManyToMany(nonUniqueColsiop.Columns, asStringbool) (errerror)
func (*DataAnalyzer)GetOneToMany¶
func (da *DataAnalyzer) GetOneToMany(uniqueCols, nonUniqueColsiop.Columns, asStringbool) (errerror)
func (*DataAnalyzer)GetOneToOne¶
func (da *DataAnalyzer) GetOneToOne(uniqueColsiop.Columns, asStringbool) (errerror)
func (*DataAnalyzer)GetSchemata¶
func (da *DataAnalyzer) GetSchemata(forcebool) (errerror)
func (*DataAnalyzer)ProcessRelations¶
func (da *DataAnalyzer) ProcessRelations() (errerror)
func (*DataAnalyzer)ProcessRelationsInteger¶
func (da *DataAnalyzer) ProcessRelationsInteger() (errerror)
func (*DataAnalyzer)ProcessRelationsString¶
func (da *DataAnalyzer) ProcessRelationsString() (errerror)
func (*DataAnalyzer)WriteRelationsYaml¶
func (da *DataAnalyzer) WriteRelationsYaml(pathstring) (errerror)
typeDatabricksConn¶added inv1.4.11
type DatabricksConn struct {BaseConnURLstringCatalogstringSchemastringWarehousestringCopyMethodstring}DatabricksConn is a Databricks connection
func (*DatabricksConn)BulkExportFlow¶added inv1.4.11
func (conn *DatabricksConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
BulkExportFlow reads in bulk
func (*DatabricksConn)BulkImportFlow¶added inv1.4.11
func (conn *DatabricksConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow inserts a flow of streams into a table
func (*DatabricksConn)BulkImportStream¶added inv1.4.11
func (conn *DatabricksConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table
func (*DatabricksConn)CastColumnForSelect¶added inv1.4.11
func (conn *DatabricksConn) CastColumnForSelect(srcColiop.Column, tgtColiop.Column) (selectStrstring)
CastColumnForSelect casts to the correct target column type
func (*DatabricksConn)Connect¶added inv1.4.11
func (conn *DatabricksConn) Connect(timeOut ...int)error
Connect connects to the database
func (*DatabricksConn)CopyFromS3¶added inv1.4.11
func (conn *DatabricksConn) CopyFromS3(tableFName, s3Path, fileFormatstring) (errerror)
CopyFromS3 uses the Databricks COPY INTO command from AWS S3
func (*DatabricksConn)CopyFromVolume¶added inv1.4.11
func (conn *DatabricksConn) CopyFromVolume(tableFName, volumePathstring, fileFormatdbio.FileType, columnsiop.Columns)error
CopyFromVolume uses the Databricks COPY INTO command from volumes
func (*DatabricksConn)CopyToS3¶added inv1.4.11
func (conn *DatabricksConn) CopyToS3(tableTable) (s3Pathstring, errerror)
CopyToS3 exports a query to an S3 location using CREATE EXTERNAL TABLE
func (*DatabricksConn)CopyViaS3¶added inv1.4.11
CopyViaS3 uses the Databricks COPY INTO command from AWS S3
func (*DatabricksConn)CopyViaVolume¶added inv1.4.11
CopyViaVolume uses Databricks volumes for bulk import, similar to Snowflake's CopyViaStage
func (*DatabricksConn)GenerateDDL¶added inv1.4.11
func (conn *DatabricksConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*DatabricksConn)GenerateMergeSQL¶added inv1.4.20
func (conn *DatabricksConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*DatabricksConn)GetColumnsFull¶added inv1.4.11
func (conn *DatabricksConn) GetColumnsFull(tableFNamestring) (dataiop.Dataset, errerror)
GetColumnsFull returns full column information for a table
func (*DatabricksConn)GetSchemata¶added inv1.4.24
func (conn *DatabricksConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
func (*DatabricksConn)GetURL¶added inv1.4.11
func (conn *DatabricksConn) GetURL(newURL ...string)string
GetURL returns the URL
func (*DatabricksConn)Init¶added inv1.4.11
func (conn *DatabricksConn) Init()error
Init initiates the object
func (*DatabricksConn)NewTransaction¶added inv1.4.11
func (conn *DatabricksConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*DatabricksConn)UnloadViaVolume¶added inv1.4.11
func (conn *DatabricksConn) UnloadViaVolume(tables ...Table) (filePathstring, unloadedFilesint, errerror)
UnloadViaVolume exports data to a Databricks volume, similar to Snowflake's UnloadViaStage
func (*DatabricksConn)VolumeDelete¶added inv1.4.11
func (conn *DatabricksConn) VolumeDelete(volumePaths ...string) (errerror)
VolumeDelete delete files in a Databricks volume path
func (*DatabricksConn)VolumeGET¶added inv1.4.11
func (conn *DatabricksConn) VolumeGET(volumePath, folderPath, localFilePathstring)error
VolumeGET downloads a file from a Databricks volume to local filesystem
func (*DatabricksConn)VolumeList¶added inv1.4.11
func (conn *DatabricksConn) VolumeList(volumePathstring) (dataiop.Dataset, errerror)
VolumeList lists files in a Databricks volume path
func (*DatabricksConn)VolumePUT¶added inv1.4.11
func (conn *DatabricksConn) VolumePUT(folderPath, localFilePath, volumePathstring)error
VolumePUT uploads a local file to a Databricks volume using SQL commands
typeDbX¶
type DbX struct {// contains filtered or unexported fields}DbX is db express
typeDuckDbConn¶
DuckDbConn is a Duck DB connection
func (*DuckDbConn)BulkImportFlow¶added inv1.2.19
func (*DuckDbConn)CastColumnForSelect¶added inv1.2.10
CastColumnForSelect casts to the correct target column type
func (*DuckDbConn)Close¶
func (conn *DuckDbConn) Close() (errerror)
func (*DuckDbConn)Connect¶
func (conn *DuckDbConn) Connect(timeOut ...int) (errerror)
func (*DuckDbConn)DuckDb¶added inv1.2.25
func (conn *DuckDbConn) DuckDb() *iop.DuckDb
DuckDb returns the DuckDb instance
func (*DuckDbConn)ExecContext¶
func (*DuckDbConn)ExecMultiContext¶
func (conn *DuckDbConn) ExecMultiContext(ctxcontext.Context, sqls ...string) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*DuckDbConn)GenerateMergeSQL¶added inv1.4.20
func (conn *DuckDbConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*DuckDbConn)GetURL¶
func (conn *DuckDbConn) GetURL(newURL ...string)string
GetURL returns the processed URL
func (*DuckDbConn)InsertBatchStream¶
func (conn *DuckDbConn) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*DuckDbConn)InsertStream¶
func (conn *DuckDbConn) InsertStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertStream demonstrates loading data into a BigQuery table using a file on the local filesystem.
func (*DuckDbConn)StreamRowsContext¶
func (conn *DuckDbConn) StreamRowsContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
typeDuckLakeConn¶added inv1.4.10
type DuckLakeConn struct {DuckDbConn// Catalog database configurationCatalogTypestring// duckdb, sqlite, postgres, mysqlCatalogSchemastring// schema to use in postgres or mysqlCatalogConnStrstring// connection string for catalog databaseDataPathstring// path to data files (local or cloud storage)Databasestring// the database name to attachedEncryptedbool// whether data is written using Parquet encryptionInliningLimitint// where to enable data inlining when attaching}DuckLakeConn is a Ducklake connection
func (*DuckLakeConn)Close¶added inv1.4.10
func (conn *DuckLakeConn) Close()error
Close closes the DuckLake connection
func (*DuckLakeConn)Connect¶added inv1.4.10
func (conn *DuckLakeConn) Connect(timeOut ...int) (errerror)
Connect establishes the DuckLake connection
func (*DuckLakeConn)GenerateMergeSQL¶added inv1.4.20
func (conn *DuckLakeConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL for DuckLake
func (*DuckLakeConn)GetURL¶added inv1.4.10
func (conn *DuckLakeConn) GetURL(newURL ...string)string
GetURL returns the processed URL
func (*DuckLakeConn)Init¶added inv1.4.10
func (conn *DuckLakeConn) Init()error
Init initiates the object
typeElasticsearchConn¶added inv1.3.5
type ElasticsearchConn struct {BaseConnURLstringClient *elasticsearch.Client}ElasticsearchConn is a elasticsearch connection
func (*ElasticsearchConn)BulkExportFlow¶added inv1.3.5
func (conn *ElasticsearchConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
func (*ElasticsearchConn)Close¶added inv1.3.5
func (conn *ElasticsearchConn) Close()error
func (*ElasticsearchConn)Connect¶added inv1.3.5
func (conn *ElasticsearchConn) Connect(timeOut ...int)error
Connect connects to the database
func (*ElasticsearchConn)ExecContext¶added inv1.3.5
func (*ElasticsearchConn)GetSchemas¶added inv1.3.5
func (conn *ElasticsearchConn) GetSchemas() (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*ElasticsearchConn)GetSchemata¶added inv1.3.5
func (conn *ElasticsearchConn) GetSchemata(levelSchemataLevel, schemastring, tables ...string) (schemataSchemata, errerror)
GetSchemata returns the database schemata
func (*ElasticsearchConn)GetTableColumns¶added inv1.3.5
func (conn *ElasticsearchConn) GetTableColumns(table *Table, fields ...string) (columnsiop.Columns, errerror)
GetTableColumns returns columns for a table
func (*ElasticsearchConn)GetTables¶added inv1.3.5
func (conn *ElasticsearchConn) GetTables(schemastring) (dataiop.Dataset, errerror)
GetTables returns tables
func (*ElasticsearchConn)Init¶added inv1.3.5
func (conn *ElasticsearchConn) Init()error
Init initiates the object
func (*ElasticsearchConn)NewTransaction¶added inv1.3.5
func (conn *ElasticsearchConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*ElasticsearchConn)StreamRowsContext¶added inv1.3.5
func (conn *ElasticsearchConn) StreamRowsContext(ctxcontext.Context, tableNamestring, Opts ...map[string]any) (ds *iop.Datastream, errerror)
typeExasolConn¶added inv1.4.16
ExasolConn is a Exasol connection
func (*ExasolConn)BulkImportFlow¶added inv1.4.16
BulkImportFlow performs bulk import for Exasol using temporary CSV files
func (*ExasolConn)BulkImportStream¶added inv1.4.16
func (conn *ExasolConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream performs bulk import for Exasol
func (*ExasolConn)Connect¶added inv1.4.16
func (conn *ExasolConn) Connect(timeOut ...int)error
Connect connects to the database
func (*ExasolConn)GenerateDDL¶added inv1.4.16
GenerateDDL generates DDL for Exasol
func (*ExasolConn)GenerateMergeSQL¶added inv1.4.20
func (conn *ExasolConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL for Exasol
func (*ExasolConn)GetURL¶added inv1.4.16
func (conn *ExasolConn) GetURL(newURL ...string)string
GetURL returns the processed URLThis method uses the official Exasol driver's configuration builder (exasol.NewConfig)to properly handle special characters in passwords and other connection parameters.This ensures passwords with backslashes, semicolons, etc. are correctly escaped.
func (*ExasolConn)Init¶added inv1.4.16
func (conn *ExasolConn) Init()error
Init initiates the connection
func (*ExasolConn)NewTransaction¶added inv1.4.16
func (conn *ExasolConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
typeIcebergConn¶added inv1.4.10
type IcebergConn struct {BaseConnURLstringCatalogTypedbio.IcebergCatalogTypeCatalogSQLConnConnectionCatalogcatalog.CatalogWarehousestring// contains filtered or unexported fields}IcebergConn is an Iceberg connection
func (*IcebergConn)BulkExportStream¶added inv1.4.10
func (conn *IcebergConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream reads table data in bulk
func (*IcebergConn)BulkImportStream¶added inv1.4.10
func (conn *IcebergConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table using Arrow format.This method converts the incoming datastream to Apache Arrow format and usesthe iceberg-go table.AppendTable API to write the data.
func (*IcebergConn)CastColumnForSelect¶added inv1.4.10
CastColumnForSelect casts to the correct target column type
func (*IcebergConn)Close¶added inv1.4.10
func (conn *IcebergConn) Close()error
Close closes the connection
func (*IcebergConn)Connect¶added inv1.4.10
func (conn *IcebergConn) Connect(timeOut ...int) (errerror)
Connect connects to the Iceberg catalog
func (*IcebergConn)CreateNamespaceIfNotExists¶added inv1.4.10
func (conn *IcebergConn) CreateNamespaceIfNotExists(schemastring) (errerror)
func (*IcebergConn)CreateTable¶added inv1.4.10
func (*IcebergConn)DropTable¶added inv1.4.10
func (conn *IcebergConn) DropTable(tableNames ...string) (errerror)
DropTable drops given table.
func (*IcebergConn)ExecContext¶added inv1.4.10
func (conn *IcebergConn) ExecContext(ctxcontext.Context, sqlstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext executes a write operation
func (*IcebergConn)GenerateDDL¶added inv1.4.10
func (conn *IcebergConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*IcebergConn)GetColumns¶added inv1.4.10
func (conn *IcebergConn) GetColumns(tableFNamestring, fields ...string) (columnsiop.Columns, errerror)
GetColumns returns the columns for a given table
func (*IcebergConn)GetCount¶added inv1.4.10
func (conn *IcebergConn) GetCount(tableFNamestring) (countint64, errerror)
GetCount returns -1 to skip validation
func (*IcebergConn)GetDataFiles¶added inv1.4.10
func (conn *IcebergConn) GetDataFiles(tTable) (dataFiles []iceberg.DataFile, errerror)
func (*IcebergConn)GetDatabases¶added inv1.4.10
func (conn *IcebergConn) GetDatabases() (dataiop.Dataset, errerror)
GetDatabases returns databases (catalogs) for Iceberg connection
func (*IcebergConn)GetMaxValue¶added inv1.4.10
GetMaxValue gets the maximum value of the given column
func (*IcebergConn)GetSchemas¶added inv1.4.10
func (conn *IcebergConn) GetSchemas() (dataiop.Dataset, errerror)
GetSchemas returns the list of namespaces (schemas)
func (*IcebergConn)GetSchemata¶added inv1.4.10
func (conn *IcebergConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table
func (*IcebergConn)GetTableColumns¶added inv1.4.10
func (*IcebergConn)GetTables¶added inv1.4.10
func (conn *IcebergConn) GetTables(schemastring) (dataiop.Dataset, errerror)
GetTables returns tables for given schema
func (*IcebergConn)GetTablesAndViews¶added inv1.4.10
func (conn *IcebergConn) GetTablesAndViews(schemastring) (dataiop.Dataset, errerror)
GetTablesAndViews returns tables and views for given schema
func (*IcebergConn)GetViews¶added inv1.4.10
func (conn *IcebergConn) GetViews(schemastring) (dataiop.Dataset, errerror)
GetViews returns views for given schema
func (*IcebergConn)Init¶added inv1.4.10
func (conn *IcebergConn) Init()error
Init initiates the object
func (*IcebergConn)InsertBatchStream¶added inv1.4.10
func (conn *IcebergConn) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*IcebergConn)InsertStream¶added inv1.4.10
func (conn *IcebergConn) InsertStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertStream inserts data into a table
func (*IcebergConn)NewTransaction¶added inv1.4.10
func (conn *IcebergConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*IcebergConn)StreamRowsContext¶added inv1.4.10
func (conn *IcebergConn) StreamRowsContext(ctxcontext.Context, sqlstring, options ...map[string]interface{}) (ds *iop.Datastream, errerror)
StreamRowsContext streams the rows of a table or query
func (*IcebergConn)SwapTable¶added inv1.4.10
func (conn *IcebergConn) SwapTable(srcTablestring, tgtTablestring) (errerror)
SwapTable swaps two tables by renaming them2025-06-09 => doesn't work, blank error
func (*IcebergConn)TableExists¶added inv1.4.10
func (conn *IcebergConn) TableExists(tTable) (existsbool, errerror)
typeIsolationLevel¶added inv1.4.11
type IsolationLevelstring
const (IsolationLevelDefaultIsolationLevel = "default"IsolationLevelReadUncommittedIsolationLevel = "read_uncommitted"IsolationLevelReadCommittedIsolationLevel = "read_committed"IsolationLevelWriteCommittedIsolationLevel = "write_committed"IsolationLevelRepeatableReadIsolationLevel = "repeatable_read"IsolationLevelSnapshotIsolationLevel = "snapshot"IsolationLevelSerializableIsolationLevel = "serializable"IsolationLevelLinearizableIsolationLevel = "linearizable")
func (IsolationLevel)AsSqlIsolationLevel¶added inv1.4.11
func (ilIsolationLevel) AsSqlIsolationLevel()sql.IsolationLevel
typeManualTransaction¶
type ManualTransaction struct {ConnConnection// contains filtered or unexported fields}func (*ManualTransaction)Commit¶
func (t *ManualTransaction) Commit() (errerror)
func (*ManualTransaction)Context¶
func (t *ManualTransaction) Context() *g.Context
func (*ManualTransaction)ExecContext¶
func (*ManualTransaction)ExecMultiContext¶
func (*ManualTransaction)Prepare¶
func (t *ManualTransaction) Prepare(querystring) (stmt *sql.Stmt, errerror)
func (*ManualTransaction)QueryContext¶
func (*ManualTransaction)Rollback¶
func (t *ManualTransaction) Rollback() (errerror)
typeMergeConfig¶added inv1.4.20
type MergeConfig struct {StrategyMergeStrategyTemplatestringMap map[string]string}typeMergeStrategy¶added inv1.4.20
type MergeStrategystring
MergeStrategy is for incremental loading
const (MergeStrategyNoneMergeStrategy = ""MergeStrategyInsertMergeStrategy = "insert"MergeStrategyUpdateMergeStrategy = "update"MergeStrategyUpdateInsertMergeStrategy = "update_insert"MergeStrategyDeleteInsertMergeStrategy = "delete_insert"MergeStrategyHistoryInsertMergeStrategy = "history_insert")
typeModelDbX¶
type ModelDbX struct {Ptr interface{} `json:"-"`RowsAffectedint `json:"-"`// contains filtered or unexported fields}ModelDbX is the base for any SQL model
typeMongoDBConn¶added inv1.1.14
MongoDBConn is a Mongo connection
func (*MongoDBConn)BulkExportFlow¶added inv1.1.14
func (conn *MongoDBConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
func (*MongoDBConn)Close¶added inv1.1.14
func (conn *MongoDBConn) Close()error
func (*MongoDBConn)Connect¶added inv1.1.14
func (conn *MongoDBConn) Connect(timeOut ...int)error
Connect connects to the database
func (*MongoDBConn)ExecContext¶added inv1.1.14
func (*MongoDBConn)GetSchemas¶added inv1.1.14
func (conn *MongoDBConn) GetSchemas() (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*MongoDBConn)GetSchemata¶added inv1.1.15
func (conn *MongoDBConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*MongoDBConn)GetTableColumns¶added inv1.1.14
func (conn *MongoDBConn) GetTableColumns(table *Table, fields ...string) (columnsiop.Columns, errerror)
NewTransaction creates a new transaction
func (*MongoDBConn)GetTables¶added inv1.1.14
func (conn *MongoDBConn) GetTables(schemastring) (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*MongoDBConn)Init¶added inv1.1.14
func (conn *MongoDBConn) Init()error
Init initiates the object
func (*MongoDBConn)NewTransaction¶added inv1.1.14
func (conn *MongoDBConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*MongoDBConn)StreamRowsContext¶added inv1.1.14
func (conn *MongoDBConn) StreamRowsContext(ctxcontext.Context, collectionNamestring, Opts ...map[string]any) (ds *iop.Datastream, errerror)
typeMsFabricConn¶added inv1.4.24
type MsFabricConn struct {MsSQLServerConnURLstring// contains filtered or unexported fields}MsFabricConn is a Microsoft Fabric connection
func (*MsFabricConn)AddMissingColumns¶added inv1.4.24
func (*MsFabricConn)BulkExportFlow¶added inv1.4.24
func (conn *MsFabricConn) BulkExportFlow(tableTable) (*iop.Dataflow,error)
BulkExportFlow exports data using cursor (OneLake export not yet supported)
func (*MsFabricConn)BulkImportFlow¶added inv1.4.24
func (conn *MsFabricConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow bulk imports using OneLake staging
func (*MsFabricConn)BulkImportStream¶added inv1.4.24
func (conn *MsFabricConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream bulk imports a stream using OneLake staging
func (*MsFabricConn)CastColumnForSelect¶added inv1.4.24
CastColumnForSelect casts to the correct target column type
func (*MsFabricConn)Connect¶added inv1.4.24
func (conn *MsFabricConn) Connect(timeOut ...int) (errerror)
func (*MsFabricConn)CopyFromOneLake¶added inv1.4.24
func (conn *MsFabricConn) CopyFromOneLake(tableFName, oneLakePathstring, columnsiop.Columns, fileFormatdbio.FileType) (errerror)
CopyFromOneLake uses the COPY INTO command to load data from OneLake
func (*MsFabricConn)GenerateDDL¶added inv1.4.24
func (*MsFabricConn)Init¶added inv1.4.24
func (conn *MsFabricConn) Init()error
Init initiates the object
typeMsSQLServerConn¶
MsSQLServerConn is a Microsoft SQL Server connection
func (*MsSQLServerConn)BcpExport¶
func (conn *MsSQLServerConn) BcpExport() (errerror)
BcpExport exports data to datastream
func (*MsSQLServerConn)BcpImportFile¶
func (conn *MsSQLServerConn) BcpImportFile(tableFName, filePathstring) (countuint64, errerror)
BcpImportFile Import using bcp toolhttps://docs.microsoft.com/en-us/sql/tools/bcp-utility?view=sql-server-ver15bcp dbo.test1 in '/tmp/LargeDataset.csv' -S tcp:sqlserver.host,51433 -d master -U sa -P 'password' -c -t ',' -b 5000Limitation: if comma or delimite is in field, it will error.need to use delimiter not in field, or do some other transformation
func (*MsSQLServerConn)BcpImportFileParrallel¶
func (conn *MsSQLServerConn) BcpImportFileParrallel(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BcpImportFileParrallel uses goroutine to import partitioned files
func (*MsSQLServerConn)BulkImportFlow¶
func (conn *MsSQLServerConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow bulk import flow
func (*MsSQLServerConn)BulkImportStream¶
func (conn *MsSQLServerConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream bulk import stream
func (*MsSQLServerConn)CastColumnForSelect¶added inv1.3.5
func (conn *MsSQLServerConn) CastColumnForSelect(srcColiop.Column, tgtColiop.Column) (selectStrstring)
CastColumnForSelect casts to the correct target column type
func (*MsSQLServerConn)Close¶added inv1.4.25
func (conn *MsSQLServerConn) Close()error
Close closes the SQL Server connection and cleans up Cloud SQL resources if applicable
func (*MsSQLServerConn)ConnString¶added inv1.2.3
func (conn *MsSQLServerConn) ConnString()string
func (*MsSQLServerConn)Connect¶added inv1.2.3
func (conn *MsSQLServerConn) Connect(timeOut ...int) (errerror)
func (*MsSQLServerConn)CopyFromAzure¶
func (conn *MsSQLServerConn) CopyFromAzure(tableFName, azPathstring) (countuint64, errerror)
CopyFromAzure uses the COPY INTO Table command from Azurehttps://docs.microsoft.com/en-us/sql/t-sql/statements/copy-into-transact-sql?view=azure-sqldw-latest
func (*MsSQLServerConn)CopyViaAzure¶
func (conn *MsSQLServerConn) CopyViaAzure(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
CopyViaAzure uses the Azure DWH COPY INTO Table command
func (*MsSQLServerConn)FedAuth¶added inv1.4.24
func (conn *MsSQLServerConn) FedAuth()string
func (*MsSQLServerConn)GenerateDDL¶added inv1.2.15
func (*MsSQLServerConn)GenerateMergeSQL¶added inv1.4.20
func (conn *MsSQLServerConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*MsSQLServerConn)GetTableColumns¶added inv1.3.5
func (*MsSQLServerConn)GetURL¶
func (conn *MsSQLServerConn) GetURL(newURL ...string)string
GetURL returns the processed URL
typeMySQLConn¶
MySQLConn is a MySQL or MariaDB connection
func (*MySQLConn)BulkExportStream¶
func (conn *MySQLConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream bulk Export
func (*MySQLConn)BulkImportStream¶
func (conn *MySQLConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream bulk import stream
func (*MySQLConn)Close¶added inv1.4.25
Close closes the MySQL connection and cleans up Cloud SQL resources if applicable
func (*MySQLConn)GenerateDDL¶added inv1.2.15
func (*MySQLConn)GenerateMergeSQL¶added inv1.4.20
func (conn *MySQLConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
UPSERThttps://vladmihalcea.com/how-do-upsert-and-merge-work-in-oracle-sql-server-postgresql-and-mysql/GenerateMergeSQL generates the upsert SQL
func (*MySQLConn)LoadDataInFile¶
LoadDataInFile Bulk Import
func (*MySQLConn)LoadDataOutFile¶
LoadDataOutFile Bulk ExportPossible error: ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the FILE privilege(s) for this operationFile privilege needs to be granted to useralso the --secure-file-priv option needs to be set properly for it to work.https://stackoverflow.com/questions/9819271/why-is-mysql-innodb-insert-so-slow to improve innodb insert speed
typeOracleConn¶
OracleConn is a Postgres connection
func (*OracleConn)BulkImportStream¶
func (conn *OracleConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream bulk import stream
func (*OracleConn)CastColumnForSelect¶added inv1.3.5
CastColumnForSelect casts to the correct target column type
func (*OracleConn)ConnString¶added inv1.1.14
func (conn *OracleConn) ConnString()string
func (*OracleConn)Connect¶added inv1.1.14
func (conn *OracleConn) Connect(timeOut ...int) (errerror)
func (*OracleConn)ExecMultiContext¶
func (conn *OracleConn) ExecMultiContext(ctxcontext.Context, qs ...string) (resultsql.Result, errerror)
ExecMultiContext runs multiple sql queries with context, returns `error`
func (*OracleConn)GenerateDDL¶added inv1.2.15
func (*OracleConn)GenerateInsertStatement¶
GenerateInsertStatement returns the proper INSERT statement
func (*OracleConn)GenerateMergeSQL¶added inv1.4.20
func (conn *OracleConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*OracleConn)GetTableColumns¶added inv1.1.8
func (*OracleConn)SQLLoad¶
func (conn *OracleConn) SQLLoad(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
SQLLoad uses sqlldr to Bulk Importcat test1.csv | sqlldr system/oracle@oracle.host:1521/xe control=sqlldr.ctl log=/dev/stdout bad=/dev/stderrcannot import when newline in value. Need to scan for new lines.
func (*OracleConn)SubmitTemplate¶added inv1.2.4
func (*OracleConn)Version¶added inv1.1.14
func (conn *OracleConn) Version()int
typePostgresConn¶
PostgresConn is a Postgres connection
func (*PostgresConn)BulkExportStream¶
func (conn *PostgresConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream uses the bulk dumping (COPY)
func (*PostgresConn)BulkImportStream¶
func (conn *PostgresConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table
func (*PostgresConn)CastColumnForSelect¶
CastColumnForSelect casts to the correct target column type
func (*PostgresConn)Close¶added inv1.4.25
func (conn *PostgresConn) Close()error
Close closes the database connection and cleans up Cloud SQL resources
func (*PostgresConn)Connect¶added inv1.4.10
func (conn *PostgresConn) Connect(timeOut ...int)error
Connect connects to the database
func (*PostgresConn)CopyToStdout¶
CopyToStdout Copy TO STDOUT
func (*PostgresConn)GenerateDDL¶added inv1.1.4
func (conn *PostgresConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (ddlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*PostgresConn)GenerateMergeSQL¶added inv1.4.20
func (conn *PostgresConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
typePrometheusConn¶added inv1.2.2
PrometheusConn is a Prometheus connection
func (*PrometheusConn)BulkExportFlow¶added inv1.2.2
func (conn *PrometheusConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
func (*PrometheusConn)Close¶added inv1.2.2
func (conn *PrometheusConn) Close()error
func (*PrometheusConn)Connect¶added inv1.2.2
func (conn *PrometheusConn) Connect(timeOut ...int)error
Connect connects to the database
func (*PrometheusConn)ExecContext¶added inv1.2.2
func (*PrometheusConn)GetSQLColumns¶added inv1.2.2
func (conn *PrometheusConn) GetSQLColumns(tableTable) (columnsiop.Columns, errerror)
func (*PrometheusConn)GetSchemas¶added inv1.2.2
func (conn *PrometheusConn) GetSchemas() (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*PrometheusConn)GetSchemata¶added inv1.2.2
func (conn *PrometheusConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*PrometheusConn)GetTableColumns¶added inv1.2.2
func (conn *PrometheusConn) GetTableColumns(table *Table, fields ...string) (columnsiop.Columns, errerror)
NewTransaction creates a new transaction
func (*PrometheusConn)GetTables¶added inv1.2.2
func (conn *PrometheusConn) GetTables(schemastring) (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*PrometheusConn)Init¶added inv1.2.2
func (conn *PrometheusConn) Init()error
Init initiates the object
func (*PrometheusConn)NewTransaction¶added inv1.2.2
func (conn *PrometheusConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*PrometheusConn)StreamRowsChunked¶added inv1.4.11
func (conn *PrometheusConn) StreamRowsChunked(queryContext *g.Context, querystring, opts map[string]interface{}) (ds *iop.Datastream, errerror)
StreamRowsChunked implements chunked streaming for Prometheus to avoid memory issues
func (*PrometheusConn)StreamRowsContext¶added inv1.2.2
func (conn *PrometheusConn) StreamRowsContext(ctxcontext.Context, querystring, Opts ...map[string]interface{}) (ds *iop.Datastream, errerror)
typeProtonConn¶added inv1.2.7
ProtonConn is a Proton connection
func (*ProtonConn)BulkImportStream¶added inv1.2.7
func (conn *ProtonConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table
func (*ProtonConn)ConnString¶added inv1.2.7
func (conn *ProtonConn) ConnString()string
func (*ProtonConn)Connect¶added inv1.2.7
func (conn *ProtonConn) Connect(timeOut ...int) (errerror)
func (*ProtonConn)ExecContext¶added inv1.2.21
func (conn *ProtonConn) ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*ProtonConn)GenerateDDL¶added inv1.2.7
func (conn *ProtonConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*ProtonConn)GenerateInsertStatement¶added inv1.2.7
GenerateInsertStatement returns the proper INSERT statement
func (*ProtonConn)GenerateMergeSQL¶added inv1.4.20
func (conn *ProtonConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*ProtonConn)GetCount¶added inv1.2.14
func (conn *ProtonConn) GetCount(tableFNamestring) (int64,error)
GetCount returns count of records
func (*ProtonConn)GetNativeType¶added inv1.2.21
func (conn *ProtonConn) GetNativeType(coliop.Column) (nativeTypestring, errerror)
func (*ProtonConn)NewTransaction¶added inv1.2.7
func (conn *ProtonConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (Transaction,error)
NewTransaction creates a new transaction
typeRedshiftConn¶
RedshiftConn is a Redshift connection
func (*RedshiftConn)BulkExportFlow¶
func (conn *RedshiftConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
BulkExportFlow reads in bulk
func (*RedshiftConn)BulkExportStream¶
func (conn *RedshiftConn) BulkExportStream(tableTable) (ds *iop.Datastream, errerror)
BulkExportStream reads in bulk
func (*RedshiftConn)BulkImportFlow¶
func (conn *RedshiftConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow inserts a flow of streams into a table.For redshift we need to create CSVs in S3 and then use the COPY command.
func (*RedshiftConn)BulkImportStream¶
func (conn *RedshiftConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table.For redshift we need to create CSVs in S3 and then use the COPY command.
func (*RedshiftConn)CastColumnForSelect¶added inv1.2.10
CastColumnForSelect casts to the correct target column type
func (*RedshiftConn)ConnString¶
func (conn *RedshiftConn) ConnString()string
func (*RedshiftConn)CopyFromS3¶
func (conn *RedshiftConn) CopyFromS3(tableFName, s3Pathstring, columnsiop.Columns) (countuint64, errerror)
CopyFromS3 uses the COPY INTO Table command from AWS S3
func (*RedshiftConn)GenerateDDL¶added inv1.1.4
func (conn *RedshiftConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*RedshiftConn)GenerateMergeSQL¶added inv1.4.20
func (conn *RedshiftConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*RedshiftConn)OptimizeTable¶added inv1.1.9
func (*RedshiftConn)Unload¶
func (conn *RedshiftConn) Unload(ctx *g.Context, fileFormatdbio.FileType, tables ...Table) (s3Pathstring, errerror)
Unload unloads a query to S3
func (*RedshiftConn)WarnStlLoadErrors¶added inv1.1.9
func (conn *RedshiftConn) WarnStlLoadErrors(errerror)
typeResult¶
type Result struct {// contains filtered or unexported fields}func (Result)LastInsertId¶
func (Result)RowsAffected¶
typeSQLiteConn¶
SQLiteConn is a SQLite connection
func (*SQLiteConn)BulkImportStream¶
func (conn *SQLiteConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream inserts a stream into a table
func (*SQLiteConn)GenerateDDL¶added inv1.2.15
func (*SQLiteConn)GenerateMergeSQL¶added inv1.4.20
func (conn *SQLiteConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*SQLiteConn)GetSchemata¶
func (conn *SQLiteConn) GetSchemata(levelSchemataLevel, schemaNamestring, tableNames ...string) (Schemata,error)
GetSchemata obtain full schemata info for a schema and/or table in current database
func (*SQLiteConn)GetURL¶
func (conn *SQLiteConn) GetURL(newURL ...string)string
GetURL returns the processed URL
typeSchema¶
type Schema struct {Namestring `json:"name"`Databasestring `json:"database"`Tables map[string]Table `json:"tables"`}Schema represents a schemata schema
typeSchemata¶
type Schemata struct {Databases map[string]Database `json:"databases"`// contains filtered or unexported fields}Schemata contains the full schema for a connection
funcGetSchemataAll¶
func GetSchemataAll(connConnection) (schemataSchemata, errerror)
GetSchemataAll obtains the schemata for all databases detected
funcGetTablesSchemata¶
func GetTablesSchemata(connConnection, tableNames ...string) (schemataSchemata, errerror)
GetTablesSchemata obtains the schemata for specified tables
func (*Schemata)LoadTablesJSON¶
LoadTablesJSON loads from a json string
typeSchemataLevel¶added inv1.2.19
type SchemataLevelstring
const (SchemataLevelSchemaSchemataLevel = "schema"SchemataLevelTableSchemataLevel = "table"SchemataLevelColumnSchemataLevel = "column")
typeSelectOptions¶added inv1.3.5
typeSnowflakeConn¶
SnowflakeConn is a Snowflake connection
func (*SnowflakeConn)BulkExportFlow¶
func (conn *SnowflakeConn) BulkExportFlow(tableTable) (df *iop.Dataflow, errerror)
BulkExportFlow reads in bulk
func (*SnowflakeConn)BulkImportFlow¶
func (conn *SnowflakeConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow bulk import flow
func (*SnowflakeConn)BulkImportStream¶
func (conn *SnowflakeConn) BulkImportStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
BulkImportStream bulk import stream
func (*SnowflakeConn)CastColumnForSelect¶added inv1.1.15
func (conn *SnowflakeConn) CastColumnForSelect(srcColiop.Column, tgtColiop.Column) (selectStrstring)
CastColumnForSelect casts to the correct target column type
func (*SnowflakeConn)ConnString¶
func (conn *SnowflakeConn) ConnString()string
func (*SnowflakeConn)Connect¶
func (conn *SnowflakeConn) Connect(timeOut ...int)error
Connect connects to the database
func (*SnowflakeConn)CopyFromAzure¶
func (conn *SnowflakeConn) CopyFromAzure(tableFName, azPathstring) (errerror)
CopyFromAzure uses the Snowflake COPY INTO Table command from Azurehttps://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html
func (*SnowflakeConn)CopyFromS3¶
func (conn *SnowflakeConn) CopyFromS3(tableFName, s3Pathstring) (errerror)
CopyFromS3 uses the Snowflake COPY INTO Table command from AWS S3https://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html
func (*SnowflakeConn)CopyToAzure¶
func (conn *SnowflakeConn) CopyToAzure(tables ...Table) (azPathstring, errerror)
CopyToAzure exports a query to an Azure location
func (*SnowflakeConn)CopyToS3¶
func (conn *SnowflakeConn) CopyToS3(tables ...Table) (s3Pathstring, errerror)
CopyToS3 exports a query to an S3 location
func (*SnowflakeConn)CopyViaAWS¶
CopyViaAWS uses the Snowflake COPY INTO Table command from AWS S3https://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html
func (*SnowflakeConn)CopyViaAzure¶
CopyViaAzure uses the Snowflake COPY INTO Table command from Azurehttps://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html
func (*SnowflakeConn)CopyViaStage¶
CopyViaStage uses the Snowflake COPY INTO Table commandhttps://docs.snowflake.com/en/sql-reference/sql/copy-into-table.html
func (*SnowflakeConn)GenerateDDL¶added inv1.1.4
func (conn *SnowflakeConn) GenerateDDL(tableTable, dataiop.Dataset, temporarybool) (sqlstring, errerror)
GenerateDDL generates a DDL based on a dataset
func (*SnowflakeConn)GenerateInsertStatement¶added inv1.2.19
func (*SnowflakeConn)GenerateMergeSQL¶added inv1.4.20
func (conn *SnowflakeConn) GenerateMergeSQL(srcTablestring, tgtTablestring, pkFields []string) (sqlstring, errerror)
GenerateMergeSQL generates the upsert SQL
func (*SnowflakeConn)GetColumnsFull¶
func (conn *SnowflakeConn) GetColumnsFull(tableFNamestring) (dataiop.Dataset, errerror)
GetColumnsFull returns columns for given table. `tableName` shouldinclude schema and table, example: `schema1.table2`fields should be `schema_name|table_name|table_type|column_name|data_type|column_id`
func (*SnowflakeConn)GetDatabases¶
func (conn *SnowflakeConn) GetDatabases() (dataiop.Dataset, errerror)
GetDatabases returns the list of databases
func (*SnowflakeConn)GetSchemas¶
func (conn *SnowflakeConn) GetSchemas() (dataiop.Dataset, errerror)
GetSchemas returns schemas
func (*SnowflakeConn)GetTables¶
func (conn *SnowflakeConn) GetTables(schemastring) (dataiop.Dataset, errerror)
GetTables returns tables
func (*SnowflakeConn)GetTablesAndViews¶added inv1.2.19
func (conn *SnowflakeConn) GetTablesAndViews(schemastring) (iop.Dataset,error)
GetTablesAndViews returns tables/views for given schema
func (*SnowflakeConn)GetViews¶
func (conn *SnowflakeConn) GetViews(schemastring) (dataiop.Dataset, errerror)
GetTables returns tables
func (*SnowflakeConn)StageGET¶added inv1.2.14
func (conn *SnowflakeConn) StageGET(internalStagePath, folderPathstring) (filePaths []string, errerror)
StageGET Copies from a staging location to a local file or folder
func (*SnowflakeConn)StagePUT¶added inv1.2.14
func (conn *SnowflakeConn) StagePUT(fileURIstring, internalStagePathstring) (errerror)
StagePUT Copies a local file or folder into a staging location
func (*SnowflakeConn)UnloadViaStage¶
typeSqlServerLogger¶added inv1.3.6
type SqlServerLogger struct{}func (*SqlServerLogger)Printf¶added inv1.3.6
func (l *SqlServerLogger) Printf(formatstring, v ...any)
func (*SqlServerLogger)Println¶added inv1.3.6
func (l *SqlServerLogger) Println(v ...any)
typeStarRocksConn¶
StarRocksConn is a StarRocks connection
func (*StarRocksConn)AddMissingColumns¶added inv1.1.8
func (*StarRocksConn)BulkImportFlow¶
func (conn *StarRocksConn) BulkImportFlow(tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
BulkImportFlow inserts a flow of streams into a table.
func (*StarRocksConn)Connect¶added inv1.4.16
func (conn *StarRocksConn) Connect(timeOut ...int) (errerror)
func (*StarRocksConn)ExecContext¶added inv1.2.19
func (conn *StarRocksConn) ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*StarRocksConn)GenerateDDL¶
GenerateDDL generates a DDL based on a dataset
func (*StarRocksConn)GetDatabases¶added inv1.1.9
func (conn *StarRocksConn) GetDatabases() (dataiop.Dataset, errerror)
GetDatabases returns the list of databases
func (*StarRocksConn)GetURL¶
func (conn *StarRocksConn) GetURL(newURL ...string)string
GetURL returns the processed URL
func (*StarRocksConn)InsertBatchStream¶
func (conn *StarRocksConn) InsertBatchStream(tableFNamestring, ds *iop.Datastream) (countuint64, errerror)
InsertBatchStream inserts a stream into a table in batch
func (*StarRocksConn)NewTransaction¶added inv1.4.25
func (conn *StarRocksConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
func (*StarRocksConn)OptimizeTable¶added inv1.1.8
func (*StarRocksConn)StreamLoad¶
func (conn *StarRocksConn) StreamLoad(feURL, tableFNamestring, df *iop.Dataflow) (countuint64, errerror)
StreamLoad bulk loadshttps://docs.starrocks.io/docs/loading/StreamLoad/https://docs.starrocks.io/docs/sql-reference/sql-statements/data-manipulation/STREAM_LOAD/
func (*StarRocksConn)WaitAlterTable¶added inv1.1.8
func (conn *StarRocksConn) WaitAlterTable(tableTable) (errerror)
typeStatFieldSQL¶
typeTable¶
type Table struct {Namestring `json:"name"`Schemastring `json:"schema"`Databasestring `json:"database,omitempty"`IsViewbool `json:"is_view,omitempty"`// whether is a viewSQLstring `json:"sql,omitempty"`DDLstring `json:"ddl,omitempty"`Dialectdbio.Type `json:"dialect,omitempty"`Columnsiop.Columns `json:"columns,omitempty"`KeysTableKeys `json:"keys,omitempty"`Rawstring `json:"raw"`// contains filtered or unexported fields}Table represents a schemata table
func (*Table)AddPrimaryKeyToDDL¶added inv1.2.15
AddPrimaryKeyToDDL adds a primary key to the table
func (*Table)Indexes¶added inv1.2.15
func (t *Table) Indexes(columnsiop.Columns) (indexes []TableIndex)
func (*Table)IsProcedural¶added inv1.3.5
func (*Table)MarshalJSON¶added inv1.2.19
func (*Table)Select¶
func (t *Table) Select(Opts ...SelectOptions) (sqlstring)
typeTableIndex¶added inv1.2.15
func (*TableIndex)CreateDDL¶added inv1.2.15
func (ti *TableIndex) CreateDDL()string
func (*TableIndex)DropDDL¶added inv1.2.15
func (ti *TableIndex) DropDDL()string
typeTransaction¶
type Transaction interface {Connection()ConnectionContext() *g.ContextCommit() (errerror)Rollback() (errerror)Prepare(querystring) (stmt *sql.Stmt, errerror)QueryContext(ctxcontext.Context, qstring, args ...interface{}) (result *sqlx.Rows, errerror)ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)ExecMultiContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)}typeTrinoConn¶added inv1.1.14
TrinoConn is a Trino connection
func (*TrinoConn)ConnString¶added inv1.1.14
func (*TrinoConn)ExecContext¶added inv1.1.14
func (conn *TrinoConn) ExecContext(ctxcontext.Context, qstring, args ...interface{}) (resultsql.Result, errerror)
ExecContext runs a sql query with context, returns `error`
func (*TrinoConn)NewTransaction¶added inv1.1.14
func (conn *TrinoConn) NewTransaction(ctxcontext.Context, options ...*sql.TxOptions) (txTransaction, errerror)
NewTransaction creates a new transaction
typeWhereClause¶
type WhereClause []interface{}WhereClause is the where clause
func (WhereClause)Args¶
func (wcWhereClause) Args() []interface{}
Args returns the where clause arguments
Source Files¶
- analyzer.go
- database.go
- database_adbc.go
- database_athena.go
- database_azuretable.go
- database_bigquery.go
- database_bigtable.go
- database_clickhouse.go
- database_d1.go
- database_databricks.go
- database_duckdb.go
- database_duckdb_unix.go
- database_ducklake.go
- database_elasticsearch.go
- database_exasol.go
- database_fabric.go
- database_iceberg.go
- database_mongo.go
- database_mysql.go
- database_oracle.go
- database_postgres.go
- database_prometheus.go
- database_proton.go
- database_redshift.go
- database_snowflake.go
- database_sqlite.go
- database_sqlserver.go
- database_starrocks.go
- database_trino.go
- dbx.go
- schemata.go
- transaction.go