Documentation ¶
Index ¶
- func ColumnsWithDataTypes(columns map[string]string, prefix string) string
- func Connect(cred CredentialsT) (*sql.DB, error)
- func Init()
- func WithConfig(h *Handle, config *config.Config)
- type CredentialsT
- type Handle
- func (pg *Handle) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
- func (*Handle) AlterColumn(_, _, _ string) (err error)
- func (pg *Handle) Cleanup()
- func (pg *Handle) Connect(warehouse warehouseutils.Warehouse) (client.Client, error)
- func (pg *Handle) CrashRecover(warehouse warehouseutils.Warehouse) (err error)
- func (pg *Handle) CreateSchema() (err error)
- func (pg *Handle) CreateTable(tableName string, columnMap map[string]string) (err error)
- func (pg *Handle) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)
- func (*Handle) DownloadIdentityRules(*misc.GZipWriter) (err error)
- func (pg *Handle) DownloadLoadFiles(tableName string) ([]string, error)
- func (pg *Handle) DropTable(tableName string) (err error)
- func (pg *Handle) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
- func (pg *Handle) GetTotalCountInTable(ctx context.Context, tableName string) (total int64, err error)
- func (*Handle) IsEmpty(_ warehouseutils.Warehouse) (empty bool, err error)
- func (*Handle) LoadIdentityMappingsTable() (err error)
- func (*Handle) LoadIdentityMergeRulesTable() (err error)
- func (pg *Handle) LoadTable(tableName string) error
- func (pg *Handle) LoadTestTable(_, tableName string, payloadMap map[string]interface{}, _ string) (err error)
- func (pg *Handle) LoadUserTables() map[string]error
- func (pg *Handle) SetConnectionTimeout(timeout time.Duration)
- func (pg *Handle) Setup(warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI) (err error)
- func (pg *Handle) TestConnection(warehouse warehouseutils.Warehouse) (err error)
- type QueryParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnsWithDataTypes ¶
func WithConfig ¶ added in v1.5.0
Types ¶
type CredentialsT ¶
type CredentialsT struct { Host string DBName string User string Password string Port string SSLMode string SSLDir string TunnelInfo *tunnelling.TunnelInfo // contains filtered or unexported fields }
type Handle ¶ added in v1.5.0
type Handle struct { DB *sql.DB Namespace string ObjectStorage string Warehouse warehouseutils.Warehouse Uploader warehouseutils.UploaderI ConnectTimeout time.Duration SkipComputingUserLatestTraits bool EnableSQLStatementExecutionPlan bool TxnRollbackTimeout time.Duration EnableDeleteByJobs bool SkipComputingUserLatestTraitsWorkspaceIDs []string EnableSQLStatementExecutionPlanWorkspaceIDs []string // contains filtered or unexported fields }
func (*Handle) AddColumns ¶ added in v1.5.0
func (pg *Handle) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
func (*Handle) AlterColumn ¶ added in v1.5.0
func (*Handle) CrashRecover ¶ added in v1.5.0
func (pg *Handle) CrashRecover(warehouse warehouseutils.Warehouse) (err error)
func (*Handle) CreateSchema ¶ added in v1.5.0
func (*Handle) CreateTable ¶ added in v1.5.0
func (*Handle) DeleteBy ¶ added in v1.5.0
func (pg *Handle) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)
DeleteBy Need to create a structure with delete parameters instead of simply adding a long list of params
func (*Handle) DownloadIdentityRules ¶ added in v1.5.0
func (*Handle) DownloadIdentityRules(*misc.GZipWriter) (err error)
func (*Handle) DownloadLoadFiles ¶ added in v1.5.0
func (*Handle) FetchSchema ¶ added in v1.5.0
func (pg *Handle) FetchSchema(warehouse warehouseutils.Warehouse) (schema, unrecognizedSchema warehouseutils.SchemaT, err error)
FetchSchema queries postgres and returns the schema associated with provided namespace
func (*Handle) GetTotalCountInTable ¶ added in v1.5.0
func (*Handle) IsEmpty ¶ added in v1.5.0
func (*Handle) IsEmpty(_ warehouseutils.Warehouse) (empty bool, err error)
func (*Handle) LoadIdentityMappingsTable ¶ added in v1.5.0
func (*Handle) LoadIdentityMergeRulesTable ¶ added in v1.5.0
func (*Handle) LoadTestTable ¶ added in v1.5.0
func (*Handle) LoadUserTables ¶ added in v1.5.0
func (*Handle) SetConnectionTimeout ¶ added in v1.5.0
func (*Handle) Setup ¶ added in v1.5.0
func (pg *Handle) Setup( warehouse warehouseutils.Warehouse, uploader warehouseutils.UploaderI, ) (err error)
func (*Handle) TestConnection ¶ added in v1.5.0
func (pg *Handle) TestConnection(warehouse warehouseutils.Warehouse) (err error)
type QueryParams ¶ added in v0.2.0
type QueryParams struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.