mysqlquery

package
v0.70.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackfillNodeSettingsNetworkParams

type BackfillNodeSettingsNetworkParams struct {
	Network     string
	StorageMode string
}

type CommitTimestamp

type CommitTimestamp struct {
	ID        int64
	Timestamp sql.NullInt64
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetNodeSettingsGatesRow

type GetNodeSettingsGatesRow struct {
	Name  string
	Value string
}

type GetNodeSettingsRow

type GetNodeSettingsRow struct {
	StorageMode string
	Network     string
}

type InsertNodeSettingsGateIfAbsentParams

type InsertNodeSettingsGateIfAbsentParams struct {
	Name          string
	Value         string
	RecordedEpoch int64
	RecordedSlot  int64
}

type InsertNodeSettingsParams

type InsertNodeSettingsParams struct {
	StorageMode string
	Network     string
}

type NodeSetting

type NodeSetting struct {
	ID          int64
	StorageMode string
	Network     string
}

type NodeSettingsGate

type NodeSettingsGate struct {
	Name          string
	Value         string
	RecordedEpoch int64
	RecordedSlot  int64
}

type Querier

type Querier interface {
	BackfillNodeSettingsNetwork(ctx context.Context, arg BackfillNodeSettingsNetworkParams) (int64, error)
	GetCommitTimestamp(ctx context.Context) (sql.NullInt64, error)
	GetNodeSettings(ctx context.Context) (GetNodeSettingsRow, error)
	GetNodeSettingsGates(ctx context.Context) ([]GetNodeSettingsGatesRow, error)
	InsertNodeSettings(ctx context.Context, arg InsertNodeSettingsParams) (int64, error)
	// INSERT IGNORE, not the ON DUPLICATE KEY UPDATE ... = VALUES(...) pattern
	// used above: that pattern always performs an UPDATE, whose RowsAffected is
	// ambiguous on a duplicate (0 normally, 1 under the driver's
	// CLIENT_FOUND_ROWS mode -- see SetNodeSettings's doc comment for the same
	// caveat). INSERT IGNORE either inserts or does nothing; RowsAffected is 1
	// or 0 with no such ambiguity, since no UPDATE ever runs.
	InsertNodeSettingsGateIfAbsent(ctx context.Context, arg InsertNodeSettingsGateIfAbsentParams) (int64, error)
	SetCommitTimestamp(ctx context.Context, timestamp sql.NullInt64) error
	UpsertNodeSettingsGate(ctx context.Context, arg UpsertNodeSettingsGateParams) error
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) BackfillNodeSettingsNetwork

func (q *Queries) BackfillNodeSettingsNetwork(ctx context.Context, arg BackfillNodeSettingsNetworkParams) (int64, error)

func (*Queries) GetCommitTimestamp

func (q *Queries) GetCommitTimestamp(ctx context.Context) (sql.NullInt64, error)

func (*Queries) GetNodeSettings

func (q *Queries) GetNodeSettings(ctx context.Context) (GetNodeSettingsRow, error)

func (*Queries) GetNodeSettingsGates

func (q *Queries) GetNodeSettingsGates(ctx context.Context) ([]GetNodeSettingsGatesRow, error)

func (*Queries) InsertNodeSettings

func (q *Queries) InsertNodeSettings(ctx context.Context, arg InsertNodeSettingsParams) (int64, error)

func (*Queries) InsertNodeSettingsGateIfAbsent

func (q *Queries) InsertNodeSettingsGateIfAbsent(ctx context.Context, arg InsertNodeSettingsGateIfAbsentParams) (int64, error)

INSERT IGNORE, not the ON DUPLICATE KEY UPDATE ... = VALUES(...) pattern used above: that pattern always performs an UPDATE, whose RowsAffected is ambiguous on a duplicate (0 normally, 1 under the driver's CLIENT_FOUND_ROWS mode -- see SetNodeSettings's doc comment for the same caveat). INSERT IGNORE either inserts or does nothing; RowsAffected is 1 or 0 with no such ambiguity, since no UPDATE ever runs.

func (*Queries) SetCommitTimestamp

func (q *Queries) SetCommitTimestamp(ctx context.Context, timestamp sql.NullInt64) error

func (*Queries) UpsertNodeSettingsGate

func (q *Queries) UpsertNodeSettingsGate(ctx context.Context, arg UpsertNodeSettingsGateParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type UpsertNodeSettingsGateParams

type UpsertNodeSettingsGateParams struct {
	Name          string
	Value         string
	RecordedEpoch int64
	RecordedSlot  int64
}

Jump to

Keyboard shortcuts

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