psql_model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountColumns = struct {
	ID         string
	TelegramID string
	Version    string
}{
	ID:         "id",
	TelegramID: "telegram_id",
	Version:    "version",
}
View Source
var AccountRels = struct {
}{}

AccountRels is where relationship names are stored.

View Source
var AccountTableColumns = struct {
	ID         string
	TelegramID string
	Version    string
}{
	ID:         "account.id",
	TelegramID: "account.telegram_id",
	Version:    "account.version",
}
View Source
var AccountWhere = struct {
	ID         whereHelperstring
	TelegramID whereHelperint64
	Version    whereHelperint64
}{
	ID:         whereHelperstring{/* contains filtered or unexported fields */},
	TelegramID: whereHelperint64{/* contains filtered or unexported fields */},
	Version:    whereHelperint64{/* contains filtered or unexported fields */},
}
View Source
var ChannelColumns = struct {
	ID       string
	Hashtags string
}{
	ID:       "id",
	Hashtags: "hashtags",
}
View Source
var ChannelRels = struct {
}{}

ChannelRels is where relationship names are stored.

View Source
var ChannelTableColumns = struct {
	ID       string
	Hashtags string
}{
	ID:       "channel.id",
	Hashtags: "channel.hashtags",
}
View Source
var ChannelWhere = struct {
	ID       whereHelperstring
	Hashtags whereHelpertypes_StringArray
}{
	ID:       whereHelperstring{/* contains filtered or unexported fields */},
	Hashtags: whereHelpertypes_StringArray{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("psql_model: 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 InputColumns = struct {
	ID          string
	Name        string
	OwnerID     string
	Inputtype   string
	Description string
	Version     string
}{
	ID:          "id",
	Name:        "name",
	OwnerID:     "owner_id",
	Inputtype:   "inputtype",
	Description: "description",
	Version:     "version",
}
View Source
var InputRels = struct {
}{}

InputRels is where relationship names are stored.

View Source
var InputTableColumns = struct {
	ID          string
	Name        string
	OwnerID     string
	Inputtype   string
	Description string
	Version     string
}{
	ID:          "input.id",
	Name:        "input.name",
	OwnerID:     "input.owner_id",
	Inputtype:   "input.inputtype",
	Description: "input.description",
	Version:     "input.version",
}
View Source
var InputWhere = struct {
	ID          whereHelperint64
	Name        whereHelperstring
	OwnerID     whereHelperint64
	Inputtype   whereHelperstring
	Description whereHelperstring
	Version     whereHelperint64
}{
	ID:          whereHelperint64{/* contains filtered or unexported fields */},
	Name:        whereHelperstring{/* contains filtered or unexported fields */},
	OwnerID:     whereHelperint64{/* contains filtered or unexported fields */},
	Inputtype:   whereHelperstring{/* contains filtered or unexported fields */},
	Description: whereHelperstring{/* contains filtered or unexported fields */},
	Version:     whereHelperint64{/* contains filtered or unexported fields */},
}
View Source
var MessageColumns = struct {
	ID              string
	Hashtags        string
	ChannelMessages string
}{
	ID:              "id",
	Hashtags:        "hashtags",
	ChannelMessages: "channel_messages",
}
View Source
var MessageRels = struct {
}{}

MessageRels is where relationship names are stored.

View Source
var MessageTableColumns = struct {
	ID              string
	Hashtags        string
	ChannelMessages string
}{
	ID:              "message.id",
	Hashtags:        "message.hashtags",
	ChannelMessages: "message.channel_messages",
}
View Source
var MessageWhere = struct {
	ID              whereHelperstring
	Hashtags        whereHelpertypes_StringArray
	ChannelMessages whereHelpertypes_JSON
}{
	ID:              whereHelperstring{/* contains filtered or unexported fields */},
	Hashtags:        whereHelpertypes_StringArray{/* contains filtered or unexported fields */},
	ChannelMessages: whereHelpertypes_JSON{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Account string
	Channel string
	Input   string
	Message string
}{
	Account: "account",
	Channel: "channel",
	Input:   "input",
	Message: "message",
}

Functions

func AccountExists

func AccountExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

AccountExists checks if the Account row exists.

func AccountExistsG

func AccountExistsG(ctx context.Context, iD string) (bool, error)

AccountExistsG checks if the Account row exists.

func Accounts

func Accounts(mods ...qm.QueryMod) accountQuery

Accounts retrieves all the records using an executor.

func ChannelExists

func ChannelExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

ChannelExists checks if the Channel row exists.

func ChannelExistsG

func ChannelExistsG(ctx context.Context, iD string) (bool, error)

ChannelExistsG checks if the Channel row exists.

func Channels

func Channels(mods ...qm.QueryMod) channelQuery

Channels retrieves all the records using an executor.

func InputExists

func InputExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

InputExists checks if the Input row exists.

func InputExistsG

func InputExistsG(ctx context.Context, iD int64) (bool, error)

InputExistsG checks if the Input row exists.

func Inputs

func Inputs(mods ...qm.QueryMod) inputQuery

Inputs retrieves all the records using an executor.

func MessageExists

func MessageExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

MessageExists checks if the Message row exists.

func MessageExistsG

func MessageExistsG(ctx context.Context, iD string) (bool, error)

MessageExistsG checks if the Message row exists.

func Messages

func Messages(mods ...qm.QueryMod) messageQuery

Messages retrieves all the records using an executor.

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

Types

type Account

type Account struct {
	ID         string `boil:"id" json:"id" toml:"id" yaml:"id"`
	TelegramID int64  `boil:"telegram_id" json:"telegram_id" toml:"telegram_id" yaml:"telegram_id"`
	Version    int64  `boil:"version" json:"version" toml:"version" yaml:"version"`

	R *accountR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L accountL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Account is an object representing the database table.

func FindAccount

func FindAccount(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Account, error)

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

func FindAccountG

func FindAccountG(ctx context.Context, iD string, selectCols ...string) (*Account, error)

FindAccountG retrieves a single record by ID.

func (*Account) Delete

func (o *Account) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*Account) DeleteG

func (o *Account) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single Account record. DeleteG will match against the primary key column to find the record to delete.

func (*Account) Insert

func (o *Account) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

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

func (*Account) InsertG

func (o *Account) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*Account) Reload

func (o *Account) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*Account) ReloadG

func (o *Account) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*Account) Update

func (o *Account) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Account. 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 (*Account) UpdateG

func (o *Account) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single Account record using the global executor. See Update for more documentation.

func (*Account) Upsert

func (o *Account) Upsert(ctx context.Context, exec boil.ContextExecutor, 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.

func (*Account) UpsertG

func (o *Account) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type AccountSlice

type AccountSlice []*Account

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

func (AccountSlice) DeleteAll

func (o AccountSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (AccountSlice) DeleteAllG

func (o AccountSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*AccountSlice) ReloadAll

func (o *AccountSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

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

func (*AccountSlice) ReloadAllG

func (o *AccountSlice) ReloadAllG(ctx context.Context) error

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

func (AccountSlice) UpdateAll

func (o AccountSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

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

func (AccountSlice) UpdateAllG

func (o AccountSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type Channel

type Channel struct {
	ID       string            `boil:"id" json:"id" toml:"id" yaml:"id"`
	Hashtags types.StringArray `boil:"hashtags" json:"hashtags" toml:"hashtags" yaml:"hashtags"`

	R *channelR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L channelL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Channel is an object representing the database table.

func FindChannel

func FindChannel(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Channel, error)

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

func FindChannelG

func FindChannelG(ctx context.Context, iD string, selectCols ...string) (*Channel, error)

FindChannelG retrieves a single record by ID.

func (*Channel) Delete

func (o *Channel) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*Channel) DeleteG

func (o *Channel) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single Channel record. DeleteG will match against the primary key column to find the record to delete.

func (*Channel) Insert

func (o *Channel) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

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

func (*Channel) InsertG

func (o *Channel) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*Channel) Reload

func (o *Channel) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*Channel) ReloadG

func (o *Channel) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*Channel) Update

func (o *Channel) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Channel. 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 (*Channel) UpdateG

func (o *Channel) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single Channel record using the global executor. See Update for more documentation.

func (*Channel) Upsert

func (o *Channel) Upsert(ctx context.Context, exec boil.ContextExecutor, 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.

func (*Channel) UpsertG

func (o *Channel) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type ChannelSlice

type ChannelSlice []*Channel

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

func (ChannelSlice) DeleteAll

func (o ChannelSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (ChannelSlice) DeleteAllG

func (o ChannelSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*ChannelSlice) ReloadAll

func (o *ChannelSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

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

func (*ChannelSlice) ReloadAllG

func (o *ChannelSlice) ReloadAllG(ctx context.Context) error

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

func (ChannelSlice) UpdateAll

func (o ChannelSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

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

func (ChannelSlice) UpdateAllG

func (o ChannelSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type Input

type Input struct {
	ID          int64  `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name        string `boil:"name" json:"name" toml:"name" yaml:"name"`
	OwnerID     int64  `boil:"owner_id" json:"owner_id" toml:"owner_id" yaml:"owner_id"`
	Inputtype   string `boil:"inputtype" json:"inputtype" toml:"inputtype" yaml:"inputtype"`
	Description string `boil:"description" json:"description" toml:"description" yaml:"description"`
	Version     int64  `boil:"version" json:"version" toml:"version" yaml:"version"`

	R *inputR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L inputL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Input is an object representing the database table.

func FindInput

func FindInput(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Input, error)

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

func FindInputG

func FindInputG(ctx context.Context, iD int64, selectCols ...string) (*Input, error)

FindInputG retrieves a single record by ID.

func (*Input) Delete

func (o *Input) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*Input) DeleteG

func (o *Input) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single Input record. DeleteG will match against the primary key column to find the record to delete.

func (*Input) Insert

func (o *Input) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

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

func (*Input) InsertG

func (o *Input) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*Input) Reload

func (o *Input) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*Input) ReloadG

func (o *Input) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*Input) Update

func (o *Input) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Input. 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 (*Input) UpdateG

func (o *Input) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single Input record using the global executor. See Update for more documentation.

func (*Input) Upsert

func (o *Input) Upsert(ctx context.Context, exec boil.ContextExecutor, 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.

func (*Input) UpsertG

func (o *Input) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type InputSlice

type InputSlice []*Input

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

func (InputSlice) DeleteAll

func (o InputSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (InputSlice) DeleteAllG

func (o InputSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*InputSlice) ReloadAll

func (o *InputSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

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

func (*InputSlice) ReloadAllG

func (o *InputSlice) ReloadAllG(ctx context.Context) error

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

func (InputSlice) UpdateAll

func (o InputSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

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

func (InputSlice) UpdateAllG

func (o InputSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

type M

type M map[string]interface{}

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

type Message

type Message struct {
	ID              string            `boil:"id" json:"id" toml:"id" yaml:"id"`
	Hashtags        types.StringArray `boil:"hashtags" json:"hashtags" toml:"hashtags" yaml:"hashtags"`
	ChannelMessages types.JSON        `boil:"channel_messages" json:"channel_messages" toml:"channel_messages" yaml:"channel_messages"`

	R *messageR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L messageL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Message is an object representing the database table.

func FindMessage

func FindMessage(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Message, error)

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

func FindMessageG

func FindMessageG(ctx context.Context, iD string, selectCols ...string) (*Message, error)

FindMessageG retrieves a single record by ID.

func (*Message) Delete

func (o *Message) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*Message) DeleteG

func (o *Message) DeleteG(ctx context.Context) (int64, error)

DeleteG deletes a single Message record. DeleteG will match against the primary key column to find the record to delete.

func (*Message) Insert

func (o *Message) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

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

func (*Message) InsertG

func (o *Message) InsertG(ctx context.Context, columns boil.Columns) error

InsertG a single record. See Insert for whitelist behavior description.

func (*Message) Reload

func (o *Message) Reload(ctx context.Context, exec boil.ContextExecutor) error

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

func (*Message) ReloadG

func (o *Message) ReloadG(ctx context.Context) error

ReloadG refetches the object from the database using the primary keys.

func (*Message) Update

func (o *Message) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Message. 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 (*Message) UpdateG

func (o *Message) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)

UpdateG a single Message record using the global executor. See Update for more documentation.

func (*Message) Upsert

func (o *Message) Upsert(ctx context.Context, exec boil.ContextExecutor, 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.

func (*Message) UpsertG

func (o *Message) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

UpsertG attempts an insert, and does an update or ignore on conflict.

type MessageSlice

type MessageSlice []*Message

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

func (MessageSlice) DeleteAll

func (o MessageSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (MessageSlice) DeleteAllG

func (o MessageSlice) DeleteAllG(ctx context.Context) (int64, error)

DeleteAllG deletes all rows in the slice.

func (*MessageSlice) ReloadAll

func (o *MessageSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

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

func (*MessageSlice) ReloadAllG

func (o *MessageSlice) ReloadAllG(ctx context.Context) error

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

func (MessageSlice) UpdateAll

func (o MessageSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

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

func (MessageSlice) UpdateAllG

func (o MessageSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)

UpdateAllG updates all rows with the specified column values.

Jump to

Keyboard shortcuts

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