dbs

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

DBS

SQL Database queries speedup, simplify, standardization.

Библиотека занимается формированием SQL-запросов для CRUD-операций со структурами, формированием списка полей для запросов, создание слайсов ссылок для загрузки данных в структуры.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo

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

FieldInfo - Сведения проецирования поля структуры на поле БД

type FieldInfoList

type FieldInfoList []FieldInfo

func (FieldInfoList) Filter

func (fil FieldInfoList) Filter(filterFunc func(fi FieldInfo) (ok bool)) FieldInfoList

func (FieldInfoList) Refs

func (fil FieldInfoList) Refs(refSource any) (result []any, err error)

Refs - получить ссылки на поля структуры из src исходя из определений полей в списке

type StructInfo

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

func NewStructInfo

func NewStructInfo(src any) (*StructInfo, error)

func (*StructInfo) AllFields

func (s *StructInfo) AllFields() FieldInfoList

func (*StructInfo) AutoFields

func (s *StructInfo) AutoFields() FieldInfoList

func (*StructInfo) NonAutoFields

func (s *StructInfo) NonAutoFields() FieldInfoList

func (*StructInfo) NonPKFields

func (s *StructInfo) NonPKFields() FieldInfoList

func (*StructInfo) PKFields

func (s *StructInfo) PKFields() FieldInfoList

func (*StructInfo) TableName

func (s *StructInfo) TableName() string

func (*StructInfo) Type

func (s *StructInfo) Type() reflect.Type

type TableNamer

type TableNamer interface {
	TableName() string
}

TableNamer - интерфейс для получения имени таблицы в БД

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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