jet/postgres/columns.go

69 lines
2.1 KiB
Go
Raw Normal View History

2019-07-27 10:40:30 +02:00
package postgres
2019-08-03 14:10:47 +02:00
import "github.com/go-jet/jet/internal/jet"
2019-07-27 10:40:30 +02:00
2019-08-17 14:49:35 +02:00
// Column is common column interface for all types of columns.
2019-08-11 14:29:03 +02:00
type Column jet.ColumnExpression
2019-08-17 14:49:35 +02:00
// IColumnList is used to store list of columns for later reuse as single projection or
// column list for UPDATE and INSERT statement.
type IColumnList jet.IColumnList
2019-08-17 14:49:35 +02:00
// ColumnList function returns list of columns that be used as projection or column list for UPDATE and INSERT statement.
var ColumnList = jet.ColumnList
2019-08-17 14:49:35 +02:00
// ColumnBool is interface for SQL boolean columns.
2019-07-27 10:40:30 +02:00
type ColumnBool jet.ColumnBool
2019-08-17 14:49:35 +02:00
// BoolColumn creates named bool column.
2019-07-27 10:40:30 +02:00
var BoolColumn = jet.BoolColumn
2019-08-17 14:49:35 +02:00
// ColumnString is interface for SQL text, character, character varying
// bytea, uuid columns and enums types.
2019-07-27 10:40:30 +02:00
type ColumnString jet.ColumnString
2019-08-17 14:49:35 +02:00
// StringColumn creates named string column.
2019-07-27 10:40:30 +02:00
var StringColumn = jet.StringColumn
2019-08-17 14:49:35 +02:00
// ColumnInteger is interface for SQL smallint, integer, bigint columns.
2019-07-27 10:40:30 +02:00
type ColumnInteger jet.ColumnInteger
2019-08-17 14:49:35 +02:00
// IntegerColumn creates named integer column.
2019-07-27 10:40:30 +02:00
var IntegerColumn = jet.IntegerColumn
2019-08-17 14:49:35 +02:00
// ColumnFloat is interface for SQL real, numeric, decimal or double precision column.
2019-07-27 10:40:30 +02:00
type ColumnFloat jet.ColumnFloat
2019-08-17 14:49:35 +02:00
// FloatColumn creates named float column.
2019-07-27 10:40:30 +02:00
var FloatColumn = jet.FloatColumn
2019-08-03 14:10:47 +02:00
2019-08-17 14:49:35 +02:00
// ColumnDate is interface of SQL date columns.
2019-07-27 10:40:30 +02:00
type ColumnDate jet.ColumnDate
2019-08-17 14:49:35 +02:00
// DateColumn creates named date column.
2019-07-27 10:40:30 +02:00
var DateColumn = jet.DateColumn
2019-08-17 14:49:35 +02:00
// ColumnTime is interface for SQL time column.
2019-07-31 18:43:54 +02:00
type ColumnTime jet.ColumnTime
2019-07-27 10:40:30 +02:00
2019-08-17 14:49:35 +02:00
// TimeColumn creates named time column
2019-07-31 18:43:54 +02:00
var TimeColumn = jet.TimeColumn
2019-08-03 14:10:47 +02:00
2019-08-17 14:49:35 +02:00
// ColumnTimez is interface of SQL time with time zone columns.
2019-07-27 10:40:30 +02:00
type ColumnTimez jet.ColumnTimez
2019-08-17 14:49:35 +02:00
// TimezColumn creates named time with time zone column.
2019-07-27 10:40:30 +02:00
var TimezColumn = jet.TimezColumn
2019-08-17 14:49:35 +02:00
// ColumnTimestamp is interface of SQL timestamp columns.
2019-07-31 18:43:54 +02:00
type ColumnTimestamp jet.ColumnTimestamp
2019-08-17 14:49:35 +02:00
// TimestampColumn creates named timestamp column
2019-07-31 18:43:54 +02:00
var TimestampColumn = jet.TimestampColumn
2019-08-03 14:10:47 +02:00
2019-08-17 14:49:35 +02:00
// ColumnTimestampz is interface of SQL timestamp with timezone columns.
2019-07-27 10:40:30 +02:00
type ColumnTimestampz jet.ColumnTimestampz
2019-08-17 14:49:35 +02:00
// TimestampzColumn creates named timestamp with time zone column.
2019-07-27 10:40:30 +02:00
var TimestampzColumn = jet.TimestampzColumn