dmltestgeneratedMToM

package
v0.0.0-...-02de949 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: Apache-2.0 Imports: 6 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 (
	TableNameAthlete               = "athlete"
	TableNameAthleteTeam           = "athlete_team"
	TableNameAthleteTeamMember     = "athlete_team_member"
	TableNameCustomerAddressEntity = "customer_address_entity"
	TableNameCustomerEntity        = "customer_entity"
)

TableName constants define the names of all tables.

Variables

This section is empty.

Functions

This section is empty.

Types

type Athlete

type Athlete struct {
	AthleteID uint32      `max_len:"10"`  // athlete_id int(10) unsigned NOT NULL PRI  auto_increment "Athlete ID"
	Firstname null.String `max_len:"340"` // firstname varchar(340) NULL  DEFAULT 'NULL'  "First Name"
	Lastname  null.String `max_len:"340"` // lastname varchar(340) NULL  DEFAULT 'NULL'  "Last Name"
	Relations *athleteRelations
}

Athlete represents a single row for DB table athlete. Auto generated. Table comment: Athletes

func (*Athlete) AssignLastInsertID

func (e *Athlete) AssignLastInsertID(id int64)

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

func (*Athlete) IsSet

func (e *Athlete) IsSet() bool

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

func (*Athlete) MapColumns

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

MapColumns implements interface ColumnMapper only partially. Auto generated.

func (*Athlete) NewRelations

func (e *Athlete) NewRelations() *athleteRelations

type AthleteTeam

type AthleteTeam struct {
	TeamID    uint32 `max_len:"10"`  // team_id int(10) unsigned NOT NULL PRI  auto_increment ""
	Name      string `max_len:"340"` // name varchar(340) NOT NULL    "Team name"
	Relations *athleteTeamRelations
}

AthleteTeam represents a single row for DB table athlete_team. Auto generated. Table comment: Athlete Team

func (*AthleteTeam) AssignLastInsertID

func (e *AthleteTeam) AssignLastInsertID(id int64)

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

func (*AthleteTeam) IsSet

func (e *AthleteTeam) IsSet() bool

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

func (*AthleteTeam) MapColumns

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

MapColumns implements interface ColumnMapper only partially. Auto generated.

func (*AthleteTeam) NewRelations

func (e *AthleteTeam) NewRelations() *athleteTeamRelations

type AthleteTeamMember

type AthleteTeamMember struct {
	ID        uint32 // id int(12) unsigned NOT NULL PRI  auto_increment ""
	TeamID    uint32 // team_id int(10) unsigned NOT NULL MUL   "Athlete Team ID or AID"
	AthleteID uint32 // athlete_id int(10) unsigned NOT NULL MUL   "Athlete ID or AGID"
}

AthleteTeamMember represents a single row for DB table athlete_team_member. Auto generated. Table comment: Athlete Team Members

func (*AthleteTeamMember) AssignLastInsertID

func (e *AthleteTeamMember) AssignLastInsertID(id int64)

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

func (*AthleteTeamMember) IsSet

func (e *AthleteTeamMember) IsSet() bool

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

func (*AthleteTeamMember) MapColumns

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

MapColumns implements interface ColumnMapper only partially. Auto generated.

type AthleteTeamMembers

type AthleteTeamMembers struct {
	Data []*AthleteTeamMember `json:"data,omitempty"`
}

AthleteTeamMembers represents a collection type for DB table athlete_team_member Not thread safe. Auto generated.

func NewAthleteTeamMembers

func NewAthleteTeamMembers() *AthleteTeamMembers

NewAthleteTeamMembers creates a new initialized collection. Auto generated.

func (*AthleteTeamMembers) AssignLastInsertID

func (cc *AthleteTeamMembers) AssignLastInsertID(id int64)

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

func (*AthleteTeamMembers) IDs

func (cc *AthleteTeamMembers) IDs(ret ...uint32) []uint32

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

func (*AthleteTeamMembers) MapColumns

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

MapColumns implements dml.ColumnMapper interface. Auto generated.

type AthleteTeams

type AthleteTeams struct {
	Data []*AthleteTeam `json:"data,omitempty"`
}

AthleteTeams represents a collection type for DB table athlete_team Not thread safe. Auto generated.

func NewAthleteTeams

func NewAthleteTeams() *AthleteTeams

NewAthleteTeams creates a new initialized collection. Auto generated.

func (*AthleteTeams) AssignLastInsertID

func (cc *AthleteTeams) AssignLastInsertID(id int64)

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

func (*AthleteTeams) MapColumns

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

MapColumns implements dml.ColumnMapper interface. Auto generated.

func (*AthleteTeams) TeamIDs

func (cc *AthleteTeams) TeamIDs(ret ...uint32) []uint32

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

type Athletes

type Athletes struct {
	Data []*Athlete `json:"data,omitempty"`
}

Athletes represents a collection type for DB table athlete Not thread safe. Auto generated.

func NewAthletes

func NewAthletes() *Athletes

NewAthletes creates a new initialized collection. Auto generated.

func (*Athletes) AssignLastInsertID

func (cc *Athletes) AssignLastInsertID(id int64)

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

func (*Athletes) AthleteIDs

func (cc *Athletes) AthleteIDs(ret ...uint32) []uint32

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

func (*Athletes) MapColumns

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

MapColumns implements dml.ColumnMapper interface. Auto generated.

type CustomerAddressEntities

type CustomerAddressEntities struct {
	Data []*CustomerAddressEntity `json:"data,omitempty"`
}

CustomerAddressEntities represents a collection type for DB table customer_address_entity Not thread safe. Auto generated.

func NewCustomerAddressEntities

func NewCustomerAddressEntities() *CustomerAddressEntities

NewCustomerAddressEntities creates a new initialized collection. Auto generated.

func (*CustomerAddressEntities) AssignLastInsertID

func (cc *CustomerAddressEntities) AssignLastInsertID(id int64)

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

func (*CustomerAddressEntities) EntityIDs

func (cc *CustomerAddressEntities) EntityIDs(ret ...uint32) []uint32

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

func (*CustomerAddressEntities) MapColumns

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

MapColumns implements dml.ColumnMapper interface. Auto generated.

type CustomerAddressEntity

type CustomerAddressEntity struct {
	EntityID    uint32      // entity_id int(10) unsigned NOT NULL PRI  auto_increment "Entity ID"
	IncrementID null.String // increment_id varchar(50) NULL  DEFAULT 'NULL'  "Increment Id"
	ParentID    null.Uint32 // parent_id int(10) unsigned NULL MUL DEFAULT 'NULL'  "Parent ID"
	CreatedAt   time.Time   // created_at timestamp NOT NULL  DEFAULT 'current_timestamp()'  "Created At"
	UpdatedAt   time.Time   // updated_at timestamp NOT NULL  DEFAULT 'current_timestamp()' on update current_timestamp() "Updated At"
	IsActive    bool        // is_active smallint(5) unsigned NOT NULL  DEFAULT '1'  "Is Active"
	City        string      // city varchar(255) NOT NULL    "City"
	Company     null.String // company varchar(255) NULL  DEFAULT 'NULL'  "Company"
	CountryID   string      // country_id varchar(255) NOT NULL    "Country"
	Firstname   string      // firstname varchar(255) NOT NULL    "First Name"
	Lastname    string      // lastname varchar(255) NOT NULL    "Last Name"
	Postcode    null.String // postcode varchar(255) NULL  DEFAULT 'NULL'  "Zip/Postal Code"
	Region      null.String // region varchar(255) NULL  DEFAULT 'NULL'  "State/Province"
	Street      string      // street text NOT NULL    "Street Address"
}

CustomerAddressEntity represents a single row for DB table customer_address_entity. Auto generated. Table comment: Customer Address Entity

func (*CustomerAddressEntity) AssignLastInsertID

func (e *CustomerAddressEntity) AssignLastInsertID(id int64)

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

func (*CustomerAddressEntity) IsSet

func (e *CustomerAddressEntity) IsSet() bool

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

func (*CustomerAddressEntity) MapColumns

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

MapColumns implements interface ColumnMapper only partially. Auto generated.

type CustomerEntities

type CustomerEntities struct {
	Data []*CustomerEntity `json:"data,omitempty"`
}

CustomerEntities represents a collection type for DB table customer_entity Not thread safe. Auto generated.

func NewCustomerEntities

func NewCustomerEntities() *CustomerEntities

NewCustomerEntities creates a new initialized collection. Auto generated.

func (*CustomerEntities) AssignLastInsertID

func (cc *CustomerEntities) AssignLastInsertID(id int64)

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

func (*CustomerEntities) EntityIDs

func (cc *CustomerEntities) EntityIDs(ret ...uint32) []uint32

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

func (*CustomerEntities) MapColumns

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

MapColumns implements dml.ColumnMapper interface. Auto generated.

type CustomerEntity

type CustomerEntity struct {
	EntityID         uint32      `max_len:"10"`  // entity_id int(10) unsigned NOT NULL PRI  auto_increment "Entity ID"
	WebsiteID        null.Uint16 `max_len:"5"`   // website_id smallint(5) unsigned NULL MUL DEFAULT 'NULL'  "Website ID"
	Email            null.String `max_len:"255"` // email varchar(255) NULL MUL DEFAULT 'NULL'  "Email"
	GroupID          uint16      `max_len:"5"`   // group_id smallint(5) unsigned NOT NULL  DEFAULT '0'  "Group ID"
	StoreID          null.Uint16 `max_len:"5"`   // store_id smallint(5) unsigned NULL MUL DEFAULT '0'  "Store ID"
	CreatedAt        time.Time   // created_at timestamp NOT NULL  DEFAULT 'current_timestamp()'  "Created At"
	UpdatedAt        time.Time   // updated_at timestamp NOT NULL  DEFAULT 'current_timestamp()' on update current_timestamp() "Updated At"
	IsActive         bool        `max_len:"5"`   // is_active smallint(5) unsigned NOT NULL  DEFAULT '1'  "Is Active"
	CreatedIn        null.String `max_len:"255"` // created_in varchar(255) NULL  DEFAULT 'NULL'  "Created From"
	Firstname        null.String `max_len:"255"` // firstname varchar(255) NULL MUL DEFAULT 'NULL'  "First Name"
	Lastname         null.String `max_len:"255"` // lastname varchar(255) NULL MUL DEFAULT 'NULL'  "Last Name"
	Dob              null.Time   // dob date NULL  DEFAULT 'NULL'  "Date of Birth"
	PasswordHash     null.String `max_len:"128"` // password_hash varchar(128) NULL  DEFAULT 'NULL'  "Password_hash"
	RpToken          null.String `max_len:"128"` // rp_token varchar(128) NULL  DEFAULT 'NULL'  "Reset password token"
	RpTokenCreatedAt null.Time   // rp_token_created_at datetime NULL  DEFAULT 'NULL'  "Reset password token creation time"
	DefaultBilling   null.Uint32 `max_len:"10"` // default_billing int(10) unsigned NULL  DEFAULT 'NULL'  "Default Billing Address"
	DefaultShipping  null.Uint32 `max_len:"10"` // default_shipping int(10) unsigned NULL  DEFAULT 'NULL'  "Default Shipping Address"
	Gender           null.Uint16 `max_len:"5"`  // gender smallint(5) unsigned NULL  DEFAULT 'NULL'  "Gender"
	Relations        *customerEntityRelations
}

CustomerEntity represents a single row for DB table customer_entity. Auto generated. Table comment: Customer Entity

func (*CustomerEntity) AssignLastInsertID

func (e *CustomerEntity) AssignLastInsertID(id int64)

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

func (*CustomerEntity) IsSet

func (e *CustomerEntity) IsSet() bool

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

func (*CustomerEntity) MapColumns

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

MapColumns implements interface ColumnMapper only partially. Auto generated.

func (*CustomerEntity) NewRelations

func (e *CustomerEntity) NewRelations() *customerEntityRelations

type DBM

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

DBM defines the DataBaseManagement object for the tables athlete, athlete_team, athlete_team_member, customer_address_entity, customer_entity

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: athlete, athlete_team, athlete_team_member, customer_address_entity, customer_entity 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
	// contains filtered or unexported fields
}

DBMOption provides various options to the DBM object.

func (*DBMOption) AddEventAthlete

func (o *DBMOption) AddEventAthlete(event dml.EventFlag, fn EventAthleteFn) *DBMOption

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

func (*DBMOption) AddEventAthleteTeam

func (o *DBMOption) AddEventAthleteTeam(event dml.EventFlag, fn EventAthleteTeamFn) *DBMOption

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

func (*DBMOption) AddEventAthleteTeamMember

func (o *DBMOption) AddEventAthleteTeamMember(event dml.EventFlag, fn EventAthleteTeamMemberFn) *DBMOption

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

func (*DBMOption) AddEventCustomerAddressEntity

func (o *DBMOption) AddEventCustomerAddressEntity(event dml.EventFlag, fn EventCustomerAddressEntityFn) *DBMOption

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

func (*DBMOption) AddEventCustomerEntity

func (o *DBMOption) AddEventCustomerEntity(event dml.EventFlag, fn EventCustomerEntityFn) *DBMOption

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

type EventAthleteFn

type EventAthleteFn func(context.Context, *Athletes, *Athlete) 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 EventAthleteTeamFn

type EventAthleteTeamFn func(context.Context, *AthleteTeams, *AthleteTeam) 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 EventAthleteTeamMemberFn

type EventAthleteTeamMemberFn func(context.Context, *AthleteTeamMembers, *AthleteTeamMember) 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 EventCustomerAddressEntityFn

type EventCustomerAddressEntityFn func(context.Context, *CustomerAddressEntities, *CustomerAddressEntity) 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 EventCustomerEntityFn

type EventCustomerEntityFn func(context.Context, *CustomerEntities, *CustomerEntity) 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.

Jump to

Keyboard shortcuts

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