base_service

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToTomb

func AddToTomb(tx *sqlx.Tx, table string, id string) error

func Create

func Create(tx *sqlx.Tx, table string, params map[string]interface{}) error

func Delete

func Delete(tx *sqlx.Tx, table string, id string) error

func DeleteBy

func DeleteBy(tx *sqlx.Tx, table string, conditions map[string]interface{}) error

func Get

func Get(tx *sqlx.Tx, table string, id string, dest interface{}) error

Get retrieves a record by ID

func GetAll

func GetAll(tx *sqlx.Tx, table string, dest interface{}) error

GetAll retrieves all records from the table

func GetAllBy

func GetAllBy(tx *sqlx.Tx, table string, conditions map[string]interface{}, dest interface{}) error

GetAllBy retrieves all records by multiple column and value conditions

func GetAllByCaseInsensitive

func GetAllByCaseInsensitive(tx *sqlx.Tx, table string, conditions map[string]interface{}, dest interface{}) error

GetAllByCaseInsensitive retrieves all records by multiple column and value conditions case insensitively

func GetBy

func GetBy(tx *sqlx.Tx, table string, conditions map[string]interface{}, dest interface{}) error

GetBy retrieves a record by multiple column and value conditions

func GetByCaseInsensitive

func GetByCaseInsensitive(tx *sqlx.Tx, table string, conditions map[string]interface{}, dest interface{}) error

GetByCaseInsensitive retrieves a record by multiple column and value conditions case insensitively

func GetByName

func GetByName(tx *sqlx.Tx, table string, name string, dest interface{}) error

func GetByNameCaseInsensitive

func GetByNameCaseInsensitive(tx *sqlx.Tx, table string, name string, dest interface{}) error

func MarkAsDeleted

func MarkAsDeleted(tx *sqlx.Tx, table string, id string) error

func Rename

func Rename(tx *sqlx.Tx, table string, id string, newName string) error

func Restore

func Restore(tx *sqlx.Tx, table string, id string) error

func Update

func Update(tx *sqlx.Tx, table string, id string, params map[string]interface{}) error

func UpdateBy

func UpdateBy(tx *sqlx.Tx, table string, conditions map[string]interface{}, params map[string]interface{}) error

func UpdateMtime

func UpdateMtime(tx *sqlx.Tx, table string, id string, mtime int64) error

func XDeleteBy

func XDeleteBy(tx *sqlx.Tx, table string, conditions map[string]interface{}) error

Types

type Table

type Table interface {
	TableName() string
	PrimaryKeyName() string
}

Jump to

Keyboard shortcuts

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