dmltestgenerated4

package
v0.0.0-...-202847b Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Code generated by corestoreio/pkg/util/codegen. DO NOT EDIT. Generated by sql/dmlgen. DO NOT EDIT.

Index

Constants

View Source
const (
	TableNameCoreConfiguration         = "core_configuration"
	TableNameSalesOrderStatusState     = "sales_order_status_state"
	TableNameViewCustomerAutoIncrement = "view_customer_auto_increment"
)

TableName constants define the names of all tables.

Variables

View Source
var Columns = struct {
	CoreConfiguration struct {
		ConfigID  string
		Scope     string
		ScopeID   string
		Expires   string
		Path      string
		Value     string
		VersionTs string
		VersionTe string
	}
	SalesOrderStatusState struct {
		Status         string
		State          string
		IsDefault      string
		VisibleOnFront string
	}
	ViewCustomerAutoIncrement struct {
		CeEntityID string
		Email      string
		Firstname  string
		Lastname   string
		City       string
	}
}{
	CoreConfiguration: struct {
		ConfigID  string
		Scope     string
		ScopeID   string
		Expires   string
		Path      string
		Value     string
		VersionTs string
		VersionTe string
	}{
		ConfigID:  "config_id",
		Scope:     "scope",
		ScopeID:   "scope_id",
		Expires:   "expires",
		Path:      "path",
		Value:     "value",
		VersionTs: "version_ts",
		VersionTe: "version_te",
	},
	SalesOrderStatusState: struct {
		Status         string
		State          string
		IsDefault      string
		VisibleOnFront string
	}{
		Status:         "status",
		State:          "state",
		IsDefault:      "is_default",
		VisibleOnFront: "visible_on_front",
	},
	ViewCustomerAutoIncrement: struct {
		CeEntityID string
		Email      string
		Firstname  string
		Lastname   string
		City       string
	}{
		CeEntityID: "ce_entity_id",
		Email:      "email",
		Firstname:  "firstname",
		Lastname:   "lastname",
		City:       "city",
	},
}

Columns struct provides for all tables the name of the columns. Allows type safety.

Functions

This section is empty.

Types

type CoreConfiguration

type CoreConfiguration struct {
	ConfigID  uint32      `max_len:"10"` // config_id int(10) unsigned NOT NULL PRI  auto_increment "Id"
	Scope     string      `max_len:"8"`  // scope varchar(8) NOT NULL MUL DEFAULT ”default”  "Scope"
	ScopeID   int32       `max_len:"10"` // scope_id int(11) NOT NULL  DEFAULT '0'  "Scope Id"
	Expires   null.Time   // expires datetime NULL  DEFAULT 'NULL'  "Value expiration time"
	Path      string      `max_len:"255"`   // path varchar(255) NOT NULL    "Path"
	Value     null.String `max_len:"65535"` // value text NULL  DEFAULT 'NULL'  "Value"
	VersionTs time.Time   // version_ts timestamp(6) NOT NULL   STORED GENERATED "Timestamp Start Versioning"
	VersionTe time.Time   // version_te timestamp(6) NOT NULL PRI  STORED GENERATED "Timestamp End Versioning"
}

CoreConfiguration represents a single row for DB table core_configuration. Auto generated. Table comment: Config Data

func (*CoreConfiguration) AssignLastInsertID

func (e *CoreConfiguration) AssignLastInsertID(id int64)

AssignLastInsertID updates the increment ID field with the last inserted ID from an INSERT operation. Implements dml.InsertIDAssigner. Auto generated.

func (*CoreConfiguration) Delete

func (e *CoreConfiguration) Delete(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

func (*CoreConfiguration) Insert

func (e *CoreConfiguration) Insert(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

func (*CoreConfiguration) IsSet

func (e *CoreConfiguration) IsSet() bool

IsSet returns true if the entity has non-empty primary keys.

func (*CoreConfiguration) Load

func (e *CoreConfiguration) Load(ctx context.Context, dbm *DBM, primaryKey uint32, opts ...dml.DBRFunc) (err error)

func (*CoreConfiguration) MapColumns

func (e *CoreConfiguration) MapColumns(cm *dml.ColumnMap) error

MapColumns implements interface ColumnMapper only partially. Auto generated.

func (*CoreConfiguration) Update

func (e *CoreConfiguration) Update(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

func (*CoreConfiguration) Upsert

func (e *CoreConfiguration) Upsert(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

type CoreConfigurations

type CoreConfigurations struct {
	Data []*CoreConfiguration `json:"data,omitempty"`
}

CoreConfigurations represents a collection type for DB table core_configuration Not thread safe. Auto generated.

func NewCoreConfigurations

func NewCoreConfigurations() *CoreConfigurations

NewCoreConfigurations creates a new initialized collection. Auto generated.

func (*CoreConfigurations) AssignLastInsertID

func (cc *CoreConfigurations) AssignLastInsertID(id int64)

AssignLastInsertID traverses through the slice and sets an incrementing new ID to each entity.

func (*CoreConfigurations) ConfigIDs

func (cc *CoreConfigurations) ConfigIDs(ret ...uint32) []uint32

ConfigIDs returns a slice with the data or appends it to a slice. Auto generated.

func (*CoreConfigurations) DBDelete

func (cc *CoreConfigurations) DBDelete(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

func (*CoreConfigurations) DBInsert

func (cc *CoreConfigurations) DBInsert(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

func (*CoreConfigurations) DBLoad

func (cc *CoreConfigurations) DBLoad(ctx context.Context, dbm *DBM, pkIDs []uint32, opts ...dml.DBRFunc) (err error)

func (*CoreConfigurations) DBUpdate

func (cc *CoreConfigurations) DBUpdate(ctx context.Context, dbm *DBM, resCheckFn func(sql.Result, error) error, opts ...dml.DBRFunc) (err error)

func (*CoreConfigurations) DBUpsert

func (cc *CoreConfigurations) DBUpsert(ctx context.Context, dbm *DBM, opts ...dml.DBRFunc) (res sql.Result, err error)

func (*CoreConfigurations) Each

Each will run function f on all items in []* CoreConfiguration . Auto generated via dmlgen.

func (*CoreConfigurations) MapColumns

func (cc *CoreConfigurations) MapColumns(cm *dml.ColumnMap) error

MapColumns implements dml.ColumnMapper interface. Auto generated.

type DBM

type DBM struct {
	*ddl.Tables
	// contains filtered or unexported fields
}

DBM defines the DataBaseManagement object for the tables core_configuration, sales_order_status_state, view_customer_auto_increment

func NewDBManager

func NewDBManager(ctx context.Context, dbmo *DBMOption) (*DBM, error)

NewDBManager returns a goified version of the MySQL/MariaDB table schema for the tables: core_configuration, sales_order_status_state, view_customer_auto_increment Auto generated by dmlgen.

type DBMOption

type DBMOption struct {
	TableOptions      []ddl.TableOption // gets applied at the beginning
	TableOptionsAfter []ddl.TableOption // gets applied at the end
	InitSelectFn      func(*dml.Select) *dml.Select
	InitUpdateFn      func(*dml.Update) *dml.Update
	InitDeleteFn      func(*dml.Delete) *dml.Delete
	InitInsertFn      func(*dml.Insert) *dml.Insert
	// contains filtered or unexported fields
}

DBMOption provides various options to the DBM object.

func (*DBMOption) AddEventCoreConfiguration

func (o *DBMOption) AddEventCoreConfiguration(event dml.EventFlag, fn EventCoreConfigurationFn) *DBMOption

AddEventCoreConfiguration adds a specific defined event call back to the DBM. It panics if the event argument is larger than dml.EventFlagMax.

func (*DBMOption) AddEventSalesOrderStatusState

func (o *DBMOption) AddEventSalesOrderStatusState(event dml.EventFlag, fn EventSalesOrderStatusStateFn) *DBMOption

AddEventSalesOrderStatusState adds a specific defined event call back to the DBM. It panics if the event argument is larger than dml.EventFlagMax.

func (*DBMOption) AddEventViewCustomerAutoIncrement

func (o *DBMOption) AddEventViewCustomerAutoIncrement(event dml.EventFlag, fn EventViewCustomerAutoIncrementFn) *DBMOption

AddEventViewCustomerAutoIncrement adds a specific defined event call back to the DBM. It panics if the event argument is larger than dml.EventFlagMax.

type EventCoreConfigurationFn

type EventCoreConfigurationFn func(context.Context, *CoreConfigurations, *CoreConfiguration) error

Event functions are getting dispatched during before or after handling a collection or an entity. Context is always non-nil but either collection or entity pointer will be set.

type EventSalesOrderStatusStateFn

type EventSalesOrderStatusStateFn func(context.Context, *SalesOrderStatusStates, *SalesOrderStatusState) error

Event functions are getting dispatched during before or after handling a collection or an entity. Context is always non-nil but either collection or entity pointer will be set.

type EventViewCustomerAutoIncrementFn

type EventViewCustomerAutoIncrementFn func(context.Context, *ViewCustomerAutoIncrements, *ViewCustomerAutoIncrement) error

Event functions are getting dispatched during before or after handling a collection or an entity. Context is always non-nil but either collection or entity pointer will be set.

type SalesOrderStatusState

type SalesOrderStatusState struct {
	Status         string // status varchar(32) NOT NULL PRI   "Status"
	State          string // state varchar(32) NOT NULL PRI   "Label"
	IsDefault      bool   // is_default smallint(5) unsigned NOT NULL  DEFAULT '0'  "Is Default"
	VisibleOnFront uint16 // visible_on_front smallint(5) unsigned NOT NULL  DEFAULT '0'  "Visible on front"
}

SalesOrderStatusState represents a single row for DB table sales_order_status_state. Auto generated. Table comment: Sales Order Status Table

func (*SalesOrderStatusState) IsSet

func (e *SalesOrderStatusState) IsSet() bool

IsSet returns true if the entity has non-empty primary keys.

func (*SalesOrderStatusState) Load

func (e *SalesOrderStatusState) Load(ctx context.Context, dbm *DBM, arg SalesOrderStatusStateLoadArgs, opts ...dml.DBRFunc) (err error)

func (*SalesOrderStatusState) MapColumns

func (e *SalesOrderStatusState) MapColumns(cm *dml.ColumnMap) error

MapColumns implements interface ColumnMapper only partially. Auto generated.

type SalesOrderStatusStateLoadArgs

type SalesOrderStatusStateLoadArgs struct {
	Status string
	State  string
	// contains filtered or unexported fields
}

type SalesOrderStatusStates

type SalesOrderStatusStates struct {
	Data []*SalesOrderStatusState `json:"data,omitempty"`
}

SalesOrderStatusStates represents a collection type for DB table sales_order_status_state Not thread safe. Auto generated.

func NewSalesOrderStatusStates

func NewSalesOrderStatusStates() *SalesOrderStatusStates

NewSalesOrderStatusStates creates a new initialized collection. Auto generated.

func (*SalesOrderStatusStates) DBLoad

func (cc *SalesOrderStatusStates) DBLoad(ctx context.Context, dbm *DBM, pkIDs []SalesOrderStatusStatesDBLoadArgs, opts ...dml.DBRFunc) (err error)

func (*SalesOrderStatusStates) Each

Each will run function f on all items in []* SalesOrderStatusState . Auto generated via dmlgen.

func (*SalesOrderStatusStates) MapColumns

func (cc *SalesOrderStatusStates) MapColumns(cm *dml.ColumnMap) error

MapColumns implements dml.ColumnMapper interface. Auto generated.

func (*SalesOrderStatusStates) States

func (cc *SalesOrderStatusStates) States(ret ...string) []string

States returns a slice with the data or appends it to a slice. Auto generated.

func (*SalesOrderStatusStates) Statuss

func (cc *SalesOrderStatusStates) Statuss(ret ...string) []string

Statuss returns a slice with the data or appends it to a slice. Auto generated.

type SalesOrderStatusStatesDBLoadArgs

type SalesOrderStatusStatesDBLoadArgs struct {
	Status string
	State  string
	// contains filtered or unexported fields
}

type ViewCustomerAutoIncrement

type ViewCustomerAutoIncrement struct {
	CeEntityID uint32      // ce_entity_id int(10) unsigned NOT NULL  DEFAULT '0'  "Entity ID"
	Email      null.String // email varchar(255) NULL  DEFAULT 'NULL'  "Email"
	Firstname  string      // firstname varchar(255) NOT NULL    "First Name"
	Lastname   string      // lastname varchar(255) NOT NULL    "Last Name"
	City       string      // city varchar(255) NOT NULL    "City"
}

ViewCustomerAutoIncrement represents a single row for DB table view_customer_auto_increment. Auto generated. Table comment: VIEW

func (*ViewCustomerAutoIncrement) IsSet

func (e *ViewCustomerAutoIncrement) IsSet() bool

IsSet returns true if the entity has non-empty primary keys.

func (*ViewCustomerAutoIncrement) Load

func (e *ViewCustomerAutoIncrement) Load(ctx context.Context, dbm *DBM, primaryKey uint32, opts ...dml.DBRFunc) (err error)

func (*ViewCustomerAutoIncrement) MapColumns

func (e *ViewCustomerAutoIncrement) MapColumns(cm *dml.ColumnMap) error

MapColumns implements interface ColumnMapper only partially. Auto generated.

type ViewCustomerAutoIncrements

type ViewCustomerAutoIncrements struct {
	Data []*ViewCustomerAutoIncrement `json:"data,omitempty"`
}

ViewCustomerAutoIncrements represents a collection type for DB table view_customer_auto_increment Not thread safe. Auto generated.

func NewViewCustomerAutoIncrements

func NewViewCustomerAutoIncrements() *ViewCustomerAutoIncrements

NewViewCustomerAutoIncrements creates a new initialized collection. Auto generated.

func (*ViewCustomerAutoIncrements) DBLoad

func (cc *ViewCustomerAutoIncrements) DBLoad(ctx context.Context, dbm *DBM, pkIDs []uint32, opts ...dml.DBRFunc) (err error)

func (*ViewCustomerAutoIncrements) Each

Each will run function f on all items in []* ViewCustomerAutoIncrement . Auto generated via dmlgen.

func (*ViewCustomerAutoIncrements) MapColumns

func (cc *ViewCustomerAutoIncrements) MapColumns(cm *dml.ColumnMap) error

MapColumns implements dml.ColumnMapper interface. Auto generated.

Jump to

Keyboard shortcuts

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