Versions in this module Expand all Collapse all v0 v0.2.0 May 25, 2022 Changes in this version + const DefaultSchema + const ErrorPostgresTable + const ErrorPostgresTableName + const PgJsonbTypeName + const PgTextTypeName + func GetPgTypeVal(a interface{}) (string, interface{}) + type ColumnSchema struct + DataType string + IsNullable bool + Name string + TypePostfix string + func (s ColumnSchema) SQL() string + type Conf struct + LoadSchemaTimeout time.Duration + SchemaName string + SkipSchemaCreation bool + UseTimescale bool + WriteTimeout time.Duration + type Connection interface + BeginTx func(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) + Close func() error + ExecContext func(ctx context.Context, query string, args ...interface{}) (sql.Result, error) + QueryContext func(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) + type Connector interface + GetConnection func(ctx context.Context) (Connection, error) + Stop func(ctx context.Context) error + type ErrDescriptor struct + Column ColumnSchema + ExistingColumn ColumnSchema + Span *klogga.Span + Table string + func (e *ErrDescriptor) Err() error + func (e *ErrDescriptor) Warn() error + type Exporter struct + func New(cfg *Conf, connFactory Connector, trs klogga.Tracer) *Exporter + func (e *Exporter) ConnFactory() Connector + func (e *Exporter) Shutdown(ctx context.Context) error + func (e *Exporter) Start(context.Context) error + func (e *Exporter) Stop(ctx context.Context) error + func (e *Exporter) Write(ctx context.Context, spans []*klogga.Span) error + type RecordSet struct + Schema *TableSchema + Spans []*klogga.Span + type TableSchema struct + func NewTableSchema(columns []*ColumnSchema) *TableSchema + func (t *TableSchema) AddColumn(col ColumnSchema) + func (t *TableSchema) IsZero() bool + func (t *TableSchema) Merge(newCols []*ColumnSchema) *TableSchema + func (t TableSchema) AlterTableStatement(schema, tableName string) string + func (t TableSchema) Column(name string) (*ColumnSchema, bool) + func (t TableSchema) ColumnNames() []string + func (t TableSchema) Columns() []*ColumnSchema + func (t TableSchema) ColumnsCount() int + func (t TableSchema) CreateTableStatement(schema, tableName string, timeCol *ColumnSchema, useTimescale bool) string + func (t TableSchema) GetAlterSchema(dataset RecordSet) (*TableSchema, []ErrDescriptor) + func (t TableSchema) InsertStatement(schema string, tableName string) string