models_sqlite

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) AllNodes

func (q *Queries) AllNodes(ctx context.Context, limit int32, offset int32) ([]models.PageNode, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CountNodes

func (q *Queries) CountNodes(ctx context.Context) (int64, error)

func (*Queries) CountNodesByTypeHash added in v1.6.6

func (q *Queries) CountNodesByTypeHash(ctx context.Context, contentType string) (int64, error)

func (*Queries) CountRootNodes

func (q *Queries) CountRootNodes(ctx context.Context) (int64, error)

func (*Queries) DecrementNumChild

func (q *Queries) DecrementNumChild(ctx context.Context, id int64) (models.PageNode, error)

func (*Queries) DeleteDescendants

func (q *Queries) DeleteDescendants(ctx context.Context, path interface{}, depth int64) error

func (*Queries) DeleteNode

func (q *Queries) DeleteNode(ctx context.Context, id int64) error

func (*Queries) DeleteNodes

func (q *Queries) DeleteNodes(ctx context.Context, id []int64) error

func (*Queries) GetChildNodes

func (q *Queries) GetChildNodes(ctx context.Context, path interface{}, depth interface{}, limit int32, offset int32) ([]models.PageNode, error)

func (*Queries) GetDescendants

func (q *Queries) GetDescendants(ctx context.Context, path interface{}, depth int64, limit int32, offset int32) ([]models.PageNode, error)

func (*Queries) GetNodeByID

func (q *Queries) GetNodeByID(ctx context.Context, id int64) (models.PageNode, error)

func (*Queries) GetNodeByPath

func (q *Queries) GetNodeByPath(ctx context.Context, path string) (models.PageNode, error)

func (*Queries) GetNodeBySlug

func (q *Queries) GetNodeBySlug(ctx context.Context, slug string, depth int64, path interface{}) (models.PageNode, error)

func (*Queries) GetNodesByDepth

func (q *Queries) GetNodesByDepth(ctx context.Context, depth int64, limit int32, offset int32) ([]models.PageNode, error)

func (*Queries) GetNodesByIDs

func (q *Queries) GetNodesByIDs(ctx context.Context, id []int64) ([]models.PageNode, error)

func (*Queries) GetNodesByPageIDs

func (q *Queries) GetNodesByPageIDs(ctx context.Context, pageID []int64) ([]models.PageNode, error)

func (*Queries) GetNodesByTypeHash

func (q *Queries) GetNodesByTypeHash(ctx context.Context, contentType string, limit int32, offset int32) ([]models.PageNode, error)

func (*Queries) GetNodesByTypeHashes

func (q *Queries) GetNodesByTypeHashes(ctx context.Context, contentType []string, limit int32, offset int32) ([]models.PageNode, error)

func (*Queries) GetNodesForPaths

func (q *Queries) GetNodesForPaths(ctx context.Context, path []string) ([]models.PageNode, error)

func (*Queries) IncrementNumChild

func (q *Queries) IncrementNumChild(ctx context.Context, id int64) (models.PageNode, error)

func (*Queries) InsertNode

func (q *Queries) InsertNode(ctx context.Context, title string, path string, depth int64, numchild int64, urlPath string, slug string, statusFlags int64, pageID int64, contentType string) (int64, error)

func (*Queries) UpdateNode

func (q *Queries) UpdateNode(ctx context.Context, title string, path string, depth int64, numchild int64, urlPath string, slug string, statusFlags int64, pageID int64, contentType string, iD int64) error

func (*Queries) UpdateNodePathAndDepth

func (q *Queries) UpdateNodePathAndDepth(ctx context.Context, path string, depth int64, iD int64) error

func (*Queries) UpdateNodeStatusFlags

func (q *Queries) UpdateNodeStatusFlags(ctx context.Context, statusFlags int64, iD int64) error

func (*Queries) UpdateNodes

func (q *Queries) UpdateNodes(ctx context.Context, nodes []*models.PageNode) error

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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