Documentation ¶
Overview ¶
Package pgsqldriver contains the types for schema 'public'.
Package pgsqldriver contains the types for schema 'public'.
Package pgsqldriver contains the types for schema 'public'.
Package pgsqldriver contains the types for schema 'public'.
Index ¶
- Constants
- Variables
- func New(host string, port uint, user string, password string, dbname string) (*sql.DB, error)
- func OmhToSQL(src *omh.DataPoint, dst *Datapoint) error
- func SQLToOmh(src *Datapoint, dst *omh.DataPoint) error
- type AcquisitionprovenanceModality
- func (am AcquisitionprovenanceModality) MarshalText() ([]byte, error)
- func (am *AcquisitionprovenanceModality) Scan(src interface{}) error
- func (am AcquisitionprovenanceModality) String() string
- func (am *AcquisitionprovenanceModality) UnmarshalText(text []byte) error
- func (am AcquisitionprovenanceModality) Value() (driver.Value, error)
- type Datapoint
- type GooseDbVersion
- func (gdv *GooseDbVersion) Delete(db XODB) error
- func (gdv *GooseDbVersion) Deleted() bool
- func (gdv *GooseDbVersion) Exists() bool
- func (gdv *GooseDbVersion) Insert(db XODB) error
- func (gdv *GooseDbVersion) Save(db XODB) error
- func (gdv *GooseDbVersion) Update(db XODB) error
- func (gdv *GooseDbVersion) Upsert(db XODB) error
- type JSON
- type ScannerValuer
- type Slice
- type StringSlice
- type XODB
Constants ¶
const ( // AcquisitionprovenanceModalitySensed is the 'sensed' AcquisitionprovenanceModality. AcquisitionprovenanceModalitySensed = AcquisitionprovenanceModality(1) // AcquisitionprovenanceModalitySelfReported is the 'self-reported' AcquisitionprovenanceModality. AcquisitionprovenanceModalitySelfReported = AcquisitionprovenanceModality(2) AcquisitionprovenanceModalityComputed = AcquisitionprovenanceModality(3) )
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
Types ¶
type AcquisitionprovenanceModality ¶
type AcquisitionprovenanceModality uint16
AcquisitionprovenanceModality is the 'acquisitionprovenance_modality' enum type from schema 'public'.
func (AcquisitionprovenanceModality) MarshalText ¶
func (am AcquisitionprovenanceModality) MarshalText() ([]byte, error)
MarshalText marshals AcquisitionprovenanceModality into text.
func (*AcquisitionprovenanceModality) Scan ¶
func (am *AcquisitionprovenanceModality) Scan(src interface{}) error
Scan satisfies the database/sql.Scanner interface for AcquisitionprovenanceModality.
func (AcquisitionprovenanceModality) String ¶
func (am AcquisitionprovenanceModality) String() string
String returns the string value of the AcquisitionprovenanceModality.
func (*AcquisitionprovenanceModality) UnmarshalText ¶
func (am *AcquisitionprovenanceModality) UnmarshalText(text []byte) error
UnmarshalText unmarshals AcquisitionprovenanceModality from text.
type Datapoint ¶
type Datapoint struct { Sk int64 `json:"sk"` // sk Oid string `json:"oid"` // oid Owner string `json:"owner"` // owner Created time.Time `json:"created"` // created Modified time.Time `json:"modified"` // modified Effective time.Time `json:"effective"` // effective Timezone string `json:"timezone"` // timezone Timeoffset int `json:"timeoffset"` // timeoffset SchemaNamespace string `json:"schema_namespace"` // schema_namespace SchemaName string `json:"schema_name"` // schema_name SchemaVersionMajor int `json:"schema_version_major"` // schema_version_major SchemaVersionMinor int `json:"schema_version_minor"` // schema_version_minor SchemaVersionPatch int `json:"schema_version_patch"` // schema_version_patch AcquisitionprovenanceSourcename string `json:"acquisitionprovenance_sourcename"` // acquisitionprovenance_sourcename AcquisitionprovenanceSourcecreationdatetime time.Time `json:"acquisitionprovenance_sourcecreationdatetime"` // acquisitionprovenance_sourcecreationdatetime AcquisitionprovenanceModality AcquisitionprovenanceModality `json:"acquisitionprovenance_modality"` // acquisitionprovenance_modality Additionalproperties JSON `json:"additionalproperties"` // additionalproperties Body JSON `json:"body"` // body // contains filtered or unexported fields }
Datapoint represents a row from 'public.datapoints'.
func DatapointByOidOwner ¶
DatapointByOidOwner retrieves a row from 'public.datapoints' as a Datapoint.
Generated from index 'datapoints_oid_owner_key'.
func DatapointBySk ¶
DatapointBySk retrieves a row from 'public.datapoints' as a Datapoint.
Generated from index 'datapoints_pkey'.
func (*Datapoint) Deleted ¶
Deleted provides information if the Datapoint has been deleted from the database.
type GooseDbVersion ¶
type GooseDbVersion struct { ID int `json:"id"` // id VersionID int64 `json:"version_id"` // version_id IsApplied bool `json:"is_applied"` // is_applied Tstamp pq.NullTime `json:"tstamp"` // tstamp // contains filtered or unexported fields }
GooseDbVersion represents a row from 'public.goose_db_version'.
func GooseDbVersionByID ¶
func GooseDbVersionByID(db XODB, id int) (*GooseDbVersion, error)
GooseDbVersionByID retrieves a row from 'public.goose_db_version' as a GooseDbVersion.
Generated from index 'goose_db_version_pkey'.
func (*GooseDbVersion) Delete ¶
func (gdv *GooseDbVersion) Delete(db XODB) error
Delete deletes the GooseDbVersion from the database.
func (*GooseDbVersion) Deleted ¶
func (gdv *GooseDbVersion) Deleted() bool
Deleted provides information if the GooseDbVersion has been deleted from the database.
func (*GooseDbVersion) Exists ¶
func (gdv *GooseDbVersion) Exists() bool
Exists determines if the GooseDbVersion exists in the database.
func (*GooseDbVersion) Insert ¶
func (gdv *GooseDbVersion) Insert(db XODB) error
Insert inserts the GooseDbVersion to the database.
func (*GooseDbVersion) Save ¶
func (gdv *GooseDbVersion) Save(db XODB) error
Save saves the GooseDbVersion to the database.
func (*GooseDbVersion) Update ¶
func (gdv *GooseDbVersion) Update(db XODB) error
Update updates the GooseDbVersion in the database.
func (*GooseDbVersion) Upsert ¶
func (gdv *GooseDbVersion) Upsert(db XODB) error
Upsert performs an upsert for GooseDbVersion.
NOTE: PostgreSQL 9.5+ only
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'public'.
This should work with database/sql.DB and database/sql.Tx.