models

package
v0.0.0-...-6a1111e Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EntryColumns = struct {
	ID              string
	CreatedAt       string
	UserID          string
	IPAddr          string
	UserAgent       string
	Namespace       string
	ClientEventID   string
	ClientEventType string
	ClientFlowID    string
	ClientFlowType  string
	ClientSessionID string
	Data            string
}{
	ID:              "id",
	CreatedAt:       "created_at",
	UserID:          "user_id",
	IPAddr:          "ip_addr",
	UserAgent:       "user_agent",
	Namespace:       "namespace",
	ClientEventID:   "client_event_id",
	ClientEventType: "client_event_type",
	ClientFlowID:    "client_flow_id",
	ClientFlowType:  "client_flow_type",
	ClientSessionID: "client_session_id",
	Data:            "data",
}
View Source
var EntryRels = struct {
}{}

EntryRels is where relationship names are stored.

View Source
var EntryTableColumns = struct {
	ID              string
	CreatedAt       string
	UserID          string
	IPAddr          string
	UserAgent       string
	Namespace       string
	ClientEventID   string
	ClientEventType string
	ClientFlowID    string
	ClientFlowType  string
	ClientSessionID string
	Data            string
}{
	ID:              "entries.id",
	CreatedAt:       "entries.created_at",
	UserID:          "entries.user_id",
	IPAddr:          "entries.ip_addr",
	UserAgent:       "entries.user_agent",
	Namespace:       "entries.namespace",
	ClientEventID:   "entries.client_event_id",
	ClientEventType: "entries.client_event_type",
	ClientFlowID:    "entries.client_flow_id",
	ClientFlowType:  "entries.client_flow_type",
	ClientSessionID: "entries.client_session_id",
	Data:            "entries.data",
}
View Source
var EntryWhere = struct {
	ID              whereHelperstring
	CreatedAt       whereHelpertime_Time
	UserID          whereHelperstring
	IPAddr          whereHelperstring
	UserAgent       whereHelperstring
	Namespace       whereHelperstring
	ClientEventID   whereHelpernull_String
	ClientEventType whereHelperstring
	ClientFlowID    whereHelpernull_String
	ClientFlowType  whereHelpernull_String
	ClientSessionID whereHelpernull_String
	Data            whereHelpernull_JSON
}{
	ID:              whereHelperstring{/* contains filtered or unexported fields */},
	CreatedAt:       whereHelpertime_Time{/* contains filtered or unexported fields */},
	UserID:          whereHelperstring{/* contains filtered or unexported fields */},
	IPAddr:          whereHelperstring{/* contains filtered or unexported fields */},
	UserAgent:       whereHelperstring{/* contains filtered or unexported fields */},
	Namespace:       whereHelperstring{/* contains filtered or unexported fields */},
	ClientEventID:   whereHelpernull_String{/* contains filtered or unexported fields */},
	ClientEventType: whereHelperstring{/* contains filtered or unexported fields */},
	ClientFlowID:    whereHelpernull_String{/* contains filtered or unexported fields */},
	ClientFlowType:  whereHelpernull_String{/* contains filtered or unexported fields */},
	ClientSessionID: whereHelpernull_String{/* contains filtered or unexported fields */},
	Data:            whereHelpernull_JSON{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var TableNames = struct {
	Entries string
}{
	Entries: "entries",
}
View Source
var ViewNames = struct {
}{}

Functions

func Entries

func Entries(mods ...qm.QueryMod) entryQuery

Entries retrieves all the records using an executor.

func EntryExists

func EntryExists(exec boil.Executor, iD string) (bool, error)

EntryExists checks if the Entry row exists.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

Types

type Entry

type Entry struct {
	ID              string      `boil:"id" json:"id" toml:"id" yaml:"id"`
	CreatedAt       time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UserID          string      `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	IPAddr          string      `boil:"ip_addr" json:"ip_addr" toml:"ip_addr" yaml:"ip_addr"`
	UserAgent       string      `boil:"user_agent" json:"user_agent" toml:"user_agent" yaml:"user_agent"`
	Namespace       string      `boil:"namespace" json:"namespace" toml:"namespace" yaml:"namespace"`
	ClientEventID   null.String `boil:"client_event_id" json:"client_event_id,omitempty" toml:"client_event_id" yaml:"client_event_id,omitempty"`
	ClientEventType string      `boil:"client_event_type" json:"client_event_type" toml:"client_event_type" yaml:"client_event_type"`
	ClientFlowID    null.String `boil:"client_flow_id" json:"client_flow_id,omitempty" toml:"client_flow_id" yaml:"client_flow_id,omitempty"`
	ClientFlowType  null.String `boil:"client_flow_type" json:"client_flow_type,omitempty" toml:"client_flow_type" yaml:"client_flow_type,omitempty"`
	ClientSessionID null.String `boil:"client_session_id" json:"client_session_id,omitempty" toml:"client_session_id" yaml:"client_session_id,omitempty"`
	Data            null.JSON   `boil:"data" json:"data,omitempty" toml:"data" yaml:"data,omitempty"`

	R *entryR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L entryL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Entry is an object representing the database table.

func FindEntry

func FindEntry(exec boil.Executor, iD string, selectCols ...string) (*Entry, error)

FindEntry retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Entry) Delete

func (o *Entry) Delete(exec boil.Executor) (int64, error)

Delete deletes a single Entry record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Entry) Insert

func (o *Entry) Insert(exec boil.Executor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Entry) Reload

func (o *Entry) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Entry) Update

func (o *Entry) Update(exec boil.Executor, columns boil.Columns) (int64, error)

Update uses an executor to update the Entry. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Entry) Upsert

func (o *Entry) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type EntrySlice

type EntrySlice []*Entry

EntrySlice is an alias for a slice of pointers to Entry. This should almost always be used instead of []Entry.

func (EntrySlice) DeleteAll

func (o EntrySlice) DeleteAll(exec boil.Executor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*EntrySlice) ReloadAll

func (o *EntrySlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (EntrySlice) UpdateAll

func (o EntrySlice) UpdateAll(exec boil.Executor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

Jump to

Keyboard shortcuts

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