sql

package
v0.0.0-...-9700327 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(database string) (*gorm.DB, func(), error)

Types

type Edge

type Edge struct {
	ID      uint   `gorm:"primarykey"`
	ObjNs   string `gorm:"index:obj"`
	ObjName string `gorm:"index:obj"`
	ObjRel  string `gorm:"index:obj"`
	SbjNs   string `gorm:"index:sbj"`
	SbjName string `gorm:"index:sbj"`
	SbjRel  string `gorm:"index:sbj"`
}

type SqlRepository

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

func NewSqlRepository

func NewSqlRepository(db *gorm.DB) (*SqlRepository, error)

func (*SqlRepository) ClearAll

func (r *SqlRepository) ClearAll(c context.Context) error

func (*SqlRepository) Create

func (r *SqlRepository) Create(c context.Context, edge domain.Edge) error

func (*SqlRepository) Delete

func (r *SqlRepository) Delete(c context.Context, edge domain.Edge,
	queryMode bool) error

func (*SqlRepository) Get

func (r *SqlRepository) Get(c context.Context, edge domain.Edge,
	queryMode bool) ([]domain.Edge, error)

func (*SqlRepository) Ping

func (r *SqlRepository) Ping(c context.Context) error

Jump to

Keyboard shortcuts

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