Documentation ¶
Index ¶
- func ColumnsWithDataTypes(columns map[string]string, prefix string) string
- func Connect(cred Credentials) (*sql.DB, error)
- func Init()
- func WithConfig(h *Handle, config *config.Config)
- type Credentials
- type Handle
- func (pg *Handle) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
- func (*Handle) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
- func (pg *Handle) Cleanup()
- func (pg *Handle) Connect(warehouse model.Warehouse) (client.Client, error)
- func (pg *Handle) CrashRecover(warehouse model.Warehouse) (err error)
- func (pg *Handle) CreateSchema() (err error)
- func (pg *Handle) CreateTable(tableName string, columnMap model.TableSchema) (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 (pq *Handle) ErrorMappings() []model.JobError
- func (pg *Handle) FetchSchema(warehouse model.Warehouse) (schema, unrecognizedSchema model.Schema, err error)
- func (pg *Handle) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)
- func (*Handle) IsEmpty(_ model.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 model.Warehouse, uploader warehouseutils.Uploader) (err error)
- func (pg *Handle) TestConnection(warehouse model.Warehouse) (err error)
- type QueryParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnsWithDataTypes ¶
func WithConfig ¶
Types ¶
type Credentials ¶
type Credentials 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 ¶
type Handle struct { DB *sql.DB Namespace string ObjectStorage string Warehouse model.Warehouse Uploader warehouseutils.Uploader ConnectTimeout time.Duration SkipComputingUserLatestTraits bool EnableSQLStatementExecutionPlan bool TxnRollbackTimeout time.Duration EnableDeleteByJobs bool SkipComputingUserLatestTraitsWorkspaceIDs []string EnableSQLStatementExecutionPlanWorkspaceIDs []string // contains filtered or unexported fields }
func (*Handle) AddColumns ¶
func (pg *Handle) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)
func (*Handle) AlterColumn ¶
func (*Handle) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)
func (*Handle) CreateSchema ¶
func (*Handle) CreateTable ¶
func (pg *Handle) CreateTable(tableName string, columnMap model.TableSchema) (err error)
func (*Handle) DeleteBy ¶
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 ¶
func (*Handle) DownloadIdentityRules(*misc.GZipWriter) (err error)
func (*Handle) DownloadLoadFiles ¶
func (*Handle) ErrorMappings ¶
func (*Handle) FetchSchema ¶
func (pg *Handle) FetchSchema(warehouse model.Warehouse) (schema, unrecognizedSchema model.Schema, err error)
FetchSchema queries postgres and returns the schema associated with provided namespace
func (*Handle) GetTotalCountInTable ¶
func (*Handle) LoadIdentityMappingsTable ¶
func (*Handle) LoadIdentityMergeRulesTable ¶
func (*Handle) LoadTestTable ¶
func (*Handle) LoadUserTables ¶
func (*Handle) SetConnectionTimeout ¶
type QueryParams ¶
type QueryParams struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.