Documentation
¶
Index ¶
- type Action
- type Config
- type Service
- type Storage
- func (s *Storage) Begin(ctx context.Context, requestID uint64) (txId uint64, err error)
- func (s *Storage) Commit(requestID uint64, txId uint64) (err error)
- func (s *Storage) Create(ctx context.Context, requestID uint64, txId uint64, rowIn *_meta.Object, ...) (err error)
- func (s *Storage) Execute(ctx context.Context, requestID uint64, txId uint64, sqlQuery string, ...) (err error)
- func (s *Storage) ExecuteScan(ctx context.Context, requestID uint64, txId uint64, dest []interface{}, ...) (exists bool, err error)
- func (s *Storage) Get(ctx context.Context, requestID uint64, txId uint64, rowOut *_meta.Object, ...) (exists bool, err error)
- func (s *Storage) GetTxFromCache(txId uint64) (tx *_sql.Tx, err error)
- func (s *Storage) Rollback(requestID uint64, txId uint64) (err error)
- func (s *Storage) Select(ctx context.Context, requestID uint64, txId uint64, rowsOut *_meta.Object, ...) (exists bool, err error)
- func (s *Storage) Update(ctx context.Context, requestID uint64, txId uint64, rowIn *_meta.Object, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
const ( PERSIST_ACTION_NONE Action = "None" // Фиктивная пустая action PERSIST_ACTION_GET Action = "Get" // Запрос одного объекта PERSIST_ACTION_CREATE Action = "Create" // Создание объекта PERSIST_ACTION_UPDATE Action = "Update" // Обновление объекта PERSIST_ACTION_DELETE Action = "Delete" // Удаление объекта PERSIST_ACTION_MERGE Action = "Merge" // Слияние объекта )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represent DB API services
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage represent DB API service
func (*Storage) Create ¶
func (s *Storage) Create(ctx context.Context, requestID uint64, txId uint64, rowIn *_meta.Object, rowOut *_meta.Object) (err error)
Create создать строку в БД
func (*Storage) Execute ¶
func (s *Storage) Execute(ctx context.Context, requestID uint64, txId uint64, sqlQuery string, args ...interface{}) (err error)
Execute выполнить код в БД
func (*Storage) ExecuteScan ¶
func (s *Storage) ExecuteScan(ctx context.Context, requestID uint64, txId uint64, dest []interface{}, sqlQuery string, args ...interface{}) (exists bool, err error)
ExecuteScan выполнить код в БД и вернуть результат
func (*Storage) Get ¶
func (s *Storage) Get(ctx context.Context, requestID uint64, txId uint64, rowOut *_meta.Object, key *_meta.Key, keyArgs ...interface{}) (exists bool, err error)
Get извлечь данные из БД
func (*Storage) GetTxFromCache ¶
Click to show internal directories.
Click to hide internal directories.