pg

package
v0.0.0-...-75137db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2013 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAggregates

func AddAggregates(table *Table, rAggs reflect.Value)

func AddDimensions

func AddDimensions(table *Table, rDims reflect.Value)

func VisitAggregates

func VisitAggregates(wrapper reflect.Value, visitor func(fieldValue reflect.Value, fieldDescription reflect.StructField))

func VisitDimensions

func VisitDimensions(wrapper reflect.Value, visitor func(fieldValue reflect.Value, fieldDescription reflect.StructField))

func VisitWrapper

func VisitWrapper(wrapper reflect.Value, visitor func(fieldValue reflect.Value, fieldDescription reflect.StructField))

Types

type AggregateColumn

type AggregateColumn interface {
	Column
	UpdateSql(intoTableName string, updateTableName string) string
}

type Column

type Column interface {
	Name() string
	TypeName() string
	PrintFormat() string
	PrintInterface(in interface{}) interface{}
}

type CountCol

type CountCol struct {
	*IntCol
}

func (*CountCol) UpdateSql

func (c *CountCol) UpdateSql(intoTableName string, updateTableName string) string

type DefaultCol

type DefaultCol struct {
	// contains filtered or unexported fields
}

func NewDefaultCol

func NewDefaultCol(name string) *DefaultCol

func (*DefaultCol) Name

func (c *DefaultCol) Name() string

func (*DefaultCol) PrintFormat

func (c *DefaultCol) PrintFormat() string

func (*DefaultCol) PrintInterface

func (c *DefaultCol) PrintInterface(in interface{}) interface{}

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(t *Table, c driver.Conn) *Executor

func NewUpsertOp

func NewUpsertOp(dbconnect string, tableName string, cd cube.CubeDescriber) (stream.Operator, stream.ProcessedNotifier, *Executor)

func (*Executor) CreateBaseTable

func (e *Executor) CreateBaseTable()

func (*Executor) CreateForeignTable

func (e *Executor) CreateForeignTable(serverName string)

func (*Executor) CreateForeignTableView

func (e *Executor) CreateForeignTableView(serverNames []string, selfServerName string)

func (*Executor) DropAllTables

func (e *Executor) DropAllTables()

func (*Executor) DropForeignTable

func (e *Executor) DropForeignTable(serverName string)

func (*Executor) DropForeignTableView

func (e *Executor) DropForeignTableView()

func (*Executor) DropPartition

func (e *Executor) DropPartition(p cube.Partition)

func (*Executor) Exec

func (e *Executor) Exec(sql string, args ...interface{}) driver.Result

func (*Executor) ExecErr

func (e *Executor) ExecErr(sql string, args ...interface{}) (driver.Result, error)

func (*Executor) UpsertCube

func (e *Executor) UpsertCube(p cube.Partition, c cube.Cuber)

func (*Executor) UpsertCubes

func (e *Executor) UpsertCubes(p cube.Partition, c []cube.Cuber)

type HllCol

type HllCol struct {
	*DefaultCol
	// contains filtered or unexported fields
}

HLL code

func (*HllCol) PrintInterface

func (c *HllCol) PrintInterface(in interface{}) interface{}

This guy is how the value is supposed to be printed out (for a COPY command to PG).

func (*HllCol) TypeName

func (c *HllCol) TypeName() string

func (*HllCol) UpdateSql

func (c *HllCol) UpdateSql(intoTableName string, updateTableName string) string

type IntCol

type IntCol struct {
	*DefaultCol
	// contains filtered or unexported fields
}

func (*IntCol) TypeName

func (c *IntCol) TypeName() string

type Partition

type Partition interface {
	GetTableName(basename string) string
	GetConstraint(t *Table) string
}

type StringCol

type StringCol struct {
	*DefaultCol
}

func (*StringCol) TypeName

func (c *StringCol) TypeName() string

type Table

type Table struct {
	// contains filtered or unexported fields
}

func MakeTable

func MakeTable(name string, cd cube.CubeDescriber) *Table

func NewTable

func NewTable(name string) *Table

func (*Table) AddAgg

func (t *Table) AddAgg(c AggregateColumn)

func (*Table) AddDim

func (t *Table) AddDim(c Column)

func (*Table) BaseTableName

func (t *Table) BaseTableName() string

func (*Table) ColumnDefinitionsSql

func (t *Table) ColumnDefinitionsSql() string

func (*Table) CopyDataFull

func (t *Table) CopyDataFull(c cube.Cuber) []byte

func (*Table) CopyDataLine

func (t *Table) CopyDataLine(dims cube.Dimensions, aggs cube.Aggregates) string

func (*Table) CopyTableSql

func (t *Table) CopyTableSql(p Partition) string

func (*Table) CreateForeignTableSql

func (t *Table) CreateForeignTableSql(serverName string) string

func (*Table) CreateForeignTableViewSql

func (t *Table) CreateForeignTableViewSql(serverNames []string, selfServerName string) string

func (*Table) CreatePartitionTableSql

func (t *Table) CreatePartitionTableSql(p Partition) string

func (*Table) CreateTableNameSql

func (t *Table) CreateTableNameSql(temp bool, name string) string

func (*Table) CreateTableSql

func (t *Table) CreateTableSql(temp bool) string

func (*Table) CreateTemporaryCopyTableSql

func (t *Table) CreateTemporaryCopyTableSql(p Partition) string

func (*Table) DropForeignTableSql

func (t *Table) DropForeignTableSql(serverName string) string

func (*Table) DropForeignTableViewSql

func (t *Table) DropForeignTableViewSql() string

func (*Table) DropPartitionTableSql

func (t *Table) DropPartitionTableSql(p Partition) string

func (*Table) DropTableSql

func (t *Table) DropTableSql() string

func (*Table) ForeignTableName

func (t *Table) ForeignTableName(serverName string) string

func (*Table) ForeignTablesViewName

func (t *Table) ForeignTablesViewName() string

func (*Table) GetOnePkColSql

func (t *Table) GetOnePkColSql(intoTableName string) string

func (*Table) GetTemporaryCopyTableName

func (t *Table) GetTemporaryCopyTableName(p Partition) string

func (*Table) ListColumnsSql

func (t *Table) ListColumnsSql() string

func (*Table) MergeCopySql

func (t *Table) MergeCopySql(p Partition) string

func (*Table) PrimaryKeyJoinConstraintsSql

func (t *Table) PrimaryKeyJoinConstraintsSql(intoTableName string, updateTableName string) string

func (*Table) PrimaryKeyListSql

func (t *Table) PrimaryKeyListSql(intoTableName string) string

func (*Table) PrimaryKeySql

func (t *Table) PrimaryKeySql() string

func (*Table) SelectFromTableSql

func (t *Table) SelectFromTableSql(where *string, limit *string, offset *string) string

func (*Table) SetTimeCol

func (t *Table) SetTimeCol(c Column)

func (*Table) UpdateAggregateSql

func (t *Table) UpdateAggregateSql(intoTableName string, updateTableName string) string

type TimeCol

type TimeCol struct {
	*DefaultCol
}

func (*TimeCol) PrintInterface

func (c *TimeCol) PrintInterface(in interface{}) interface{}

func (*TimeCol) TypeName

func (c *TimeCol) TypeName() string

type TimePartition

type TimePartition struct {
	*cube.TimePartition
}

func (TimePartition) GetConstraint

func (p TimePartition) GetConstraint(t *Table) string

func (TimePartition) GetTableName

func (p TimePartition) GetTableName(basename string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL