Documentation ¶
Overview ¶
Package mysqldriver contains the types for schema 'dsu'.
Package mysqldriver contains the types for schema 'dsu'.
Package mysqldriver contains the types for schema 'dsu'.
Package mysqldriver contains the types for schema 'dsu'.
Index ¶
- Constants
- Variables
- func GorpInserter(db *gorp.DbMap) gin.HandlerFunc
- func New(host string, port uint, user string, password string, dbname string) (*gorp.DbMap, error)
- func OmhToSQL(src *models.DataPoint, dst *Datapoint) error
- func SQLToOmh(src *Datapoint, dst *models.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
- 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) )
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
func GorpInserter ¶
func GorpInserter(db *gorp.DbMap) gin.HandlerFunc
GorpInserter is a gin middleware that will insert a Gorp DbMao into the context.
Types ¶
type AcquisitionprovenanceModality ¶
type AcquisitionprovenanceModality uint16
AcquisitionprovenanceModality is the 'acquisitionprovenance_modality' enum type from schema 'dsu'.
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 uint64 `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 int16 `json:"schema_version_major"` // schema_version_major SchemaVersionMinor int16 `json:"schema_version_minor"` // schema_version_minor SchemaVersionPatch int16 `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 string `json:"additionalproperties"` // additionalproperties Body string `json:"body"` // body // contains filtered or unexported fields }
Datapoint represents a row from 'dsu.datapoints'.
func DatapointByOidOwner ¶
DatapointByOidOwner retrieves a row from 'dsu.datapoints' as a Datapoint.
Generated from index 'oid'.
func DatapointBySk ¶
DatapointBySk retrieves a row from 'dsu.datapoints' as a Datapoint.
Generated from index 'datapoints_sk_pkey'.
func DatapointBySk2 ¶
DatapointBySk retrieves a row from 'dsu.datapoints' as a Datapoint.
Generated from index 'sk'.
func (*Datapoint) Deleted ¶
Deleted provides information if the Datapoint has been deleted from the database.
type GooseDbVersion ¶
type GooseDbVersion struct { ID uint64 `json:"id"` // id VersionID int64 `json:"version_id"` // version_id IsApplied bool `json:"is_applied"` // is_applied Tstamp mysql.NullTime `json:"tstamp"` // tstamp // contains filtered or unexported fields }
GooseDbVersion represents a row from 'dsu.goose_db_version'.
func GooseDbVersionByID ¶
func GooseDbVersionByID(db XODB, id uint64) (*GooseDbVersion, error)
GooseDbVersionByID retrieves a row from 'dsu.goose_db_version' as a GooseDbVersion.
Generated from index 'goose_db_version_id_pkey'.
func GooseDbVersionByID2 ¶
func GooseDbVersionByID2(db XODB, id uint64) (*GooseDbVersion, error)
GooseDbVersionByID retrieves a row from 'dsu.goose_db_version' as a GooseDbVersion.
Generated from index 'id'.
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.
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 'dsu'.
This should work with database/sql.DB and database/sql.Tx.