Versions in this module Expand all Collapse all v1 v1.1.3 Dec 4, 2022 Changes in this version + type Database struct + func NewDatabase(context *context.Context, core *component.Core) *Database + func (d *Database) CommitTransaction(table string, transactionId string) (body string, err error) + func (d *Database) Count(table string, query *query.Query, transactionId ...string) (body string, err error) + func (d *Database) DeleteDocument(table, docId string, transactionId ...string) (body string, err error) + func (d *Database) DeleteMany(table string, query *query.Query, transactionId ...string) (body string, err error) + func (d *Database) DeleteOne(table string, query *query.Query, transactionId ...string) (body string, err error) + func (d *Database) Find(table string, query *query.Query, limit, skip uint64, fields bson.M, ...) (body string, err error) + func (d *Database) GetDocument(table, docId string, limit, skip uint64, fields bson.M, sort bson.M, ...) (body string, err error) + func (d *Database) HttpDeleteJson(path string, request interface{}, headers ...map[string]string) (body string, err error) + func (d *Database) HttpGetJson(path string, params url.Values, headers ...map[string]string) (body string, err error) + func (d *Database) HttpPatchJson(path string, request interface{}, headers ...map[string]string) (body string, err error) + func (d *Database) HttpPostJson(path string, request interface{}, headers ...map[string]string) (body string, err error) + func (d *Database) InsertDocument(table, docId string, data bson.M, transactionId ...string) (body string, err error) + func (d *Database) InsertDocuments(table string, data []bson.M, transactionId ...string) (body string, err error) + func (d *Database) RollbackTransaction(table string, transactionId string) (body string, err error) + func (d *Database) SetDocument(table, docId string, data bson.M, transactionId ...string) (body string, err error) + func (d *Database) Transaction(table string) (body string, err error) + func (d *Database) UpdateDocument(table, docId string, data bson.M, transactionId ...string) (body string, err error) + func (d *Database) UpdateMany(table string, query *query.Query, data bson.M, transactionId ...string) (body string, err error) + func (d *Database) UpdateOne(table string, query *query.Query, data bson.M, transactionId ...string) (body string, err error)