gdmgo

package
v0.0.0-...-7424bbb Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iter

type Iter struct {
	*mgo.Iter
	// contains filtered or unexported fields
}

Iter Iter

func (*Iter) Foreach

func (its *Iter) Foreach(fun interface{})

Foreach Foreach

type ReadWrite

type ReadWrite struct {
	*gdio.Reader
	// contains filtered or unexported fields
}

ReadWrite ReadWrite

func NewReadWrite

func NewReadWrite(source gdio.ISource, dbName string) *ReadWrite

NewReadWrite NewReadWrite

func (*ReadWrite) Close

func (its *ReadWrite) Close()

Close Close

func (*ReadWrite) DBName

func (its *ReadWrite) DBName() string

DBName DBName

func (*ReadWrite) DeleteOne

func (its *ReadWrite) DeleteOne(in interface{})

DeleteOne DeleteOne

func (*ReadWrite) FindAll

func (its *ReadWrite) FindAll(ptr, fun interface{})

FindAll FindAll

func (*ReadWrite) FindAllByIndex

func (its *ReadWrite) FindAllByIndex(ptr, key, fun interface{}) error

FindAllByIndex FindAllByIndex

func (*ReadWrite) FindOne

func (its *ReadWrite) FindOne(ptr, key interface{}) error

FindOne FindOne

func (*ReadWrite) FindOneByIndex

func (its *ReadWrite) FindOneByIndex(ptr, lk, pk interface{}) error

FindOneByIndex FindOneByIndex

func (*ReadWrite) FindOrNewOne

func (its *ReadWrite) FindOrNewOne(out, id interface{}) error

FindOrNewOne FindOrNewOne

func (*ReadWrite) New

func (its *ReadWrite) New(in interface{}) error

New New

func (*ReadWrite) RemoveOne

func (its *ReadWrite) RemoveOne(in interface{})

RemoveOne RemoveOne

func (*ReadWrite) Write

func (its *ReadWrite) Write(in interface{})

Write Write

func (*ReadWrite) WriteAndDelete

func (its *ReadWrite) WriteAndDelete(in interface{})

WriteAndDelete WriteAndDelete

type Record

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

Record Record

func NewRecord

func NewRecord(source gdio.ISource, dbName string, in interface{}) *Record

NewRecord NewRecord

func (*Record) Count

func (its *Record) Count() uint

Count Count

func (*Record) GetByIndex

func (its *Record) GetByIndex(_ interface{}) (interface{}, error)

GetByIndex GetByIndex

func (*Record) GetByIndexes

func (its *Record) GetByIndexes(_, _ interface{}) (interface{}, error)

GetByIndexes GetByIndexes

func (*Record) Index

func (its *Record) Index(out, kValue interface{}) error

Index Index

func (*Record) Indexes

func (its *Record) Indexes(out, lkValue, pkValue interface{}) error

Indexes Indexes

func (*Record) Iterator

func (its *Record) Iterator(in, fun interface{}) (err error)

Iterator Iterator

func (*Record) IteratorByIndex

func (its *Record) IteratorByIndex(in, kValue, fun interface{}) (err error)

IteratorByIndex IteratorByIndex

func (*Record) Read

func (its *Record) Read(_ interface{}) error

Read Read

func (*Record) Remove

func (its *Record) Remove(isDelete bool, args ...interface{}) error

Remove Remove

func (*Record) Write

func (its *Record) Write(isNew bool, args ...interface{}) error

Write Write

type Source

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

Source Source

func NewSource

func NewSource(url string, connNum int) (*Source, error)

NewSource NewSource

func (*Source) Close

func (its *Source) Close()

Close Close

func (*Source) FindAll

func (its *Source) FindAll(dbName string, query bson.M, ptr interface{}) *Iter

FindAll FindAll

func (*Source) FindOne

func (its *Source) FindOne(dbName string, query bson.M, out interface{}) error

FindOne FindOne

func (*Source) Insert

func (its *Source) Insert(dbName, colName string, data map[string]interface{}) error

Insert Insert

func (*Source) InsertOne

func (its *Source) InsertOne(dbName string, ptr interface{}) error

InsertOne InsertOne

func (*Source) ReadAll

func (its *Source) ReadAll(fun func(interface{}, gdio.IRecord) interface{}) error

ReadAll ReadAll

func (*Source) ReadOne

func (its *Source) ReadOne(p interface{}, record gdio.IRecord) error

ReadOne ReadOne

func (*Source) Remove

func (its *Source) Remove(args ...interface{}) error

Remove Remove

func (*Source) RemoveAll

func (its *Source) RemoveAll(dbName, colName string) error

RemoveAll RemoveAll

func (*Source) RemoveOne

func (its *Source) RemoveOne(dbName string, ptr interface{})

RemoveOne RemoveOne

func (*Source) SetIndex

func (its *Source) SetIndex(dbName string, ptr interface{}, indexes []*gdio.IndexInfo) error

SetIndex SetIndex

func (*Source) Update

func (its *Source) Update(dbName string, ptr interface{}) error

Update Update

func (*Source) Write

func (its *Source) Write(args ...interface{}) error

Write Write

Jump to

Keyboard shortcuts

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