Documentation ¶
Index ¶
Constants ¶
View Source
const (
// SourceType for this mongo source.
SourceType = "mongo"
)
Variables ¶
View Source
var (
// DefaultLimit is default page size
DefaultLimit = 20
)
Functions ¶
Types ¶
type ResultReader ¶
type ResultReader struct { *exec.TaskBase Docs []u.JsonHelper Vals [][]driver.Value Total int Aggs u.JsonHelper ScrollId string // contains filtered or unexported fields }
ResultReader Mongo implements result paging, reading - driver.Rows
func NewResultReader ¶
func NewResultReader(req *SqlToMgo, q *mgo.Query, limit int) *ResultReader
func (*ResultReader) Close ¶
func (m *ResultReader) Close() error
func (*ResultReader) Run ¶
func (m *ResultReader) Run() error
type ResultReaderNext ¶
type ResultReaderNext struct {
*ResultReader
}
ResultReaderNext a wrapper, allowing us to implement sql/driver Next() interface which is different than qlbridge/datasource Next()
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source Mongo Data Source implements qlbridge DataSource interfaces to mongo server - singleton shared across all sessions/connections - creates connections by mgo.Session.Clone()
type SqlToMgo ¶
SqlToMgo Rewrite a Sql AST statement to a Mongo request
- Walk the AST and see what can be pushed down and what can't
- try to poly-fill the missing pieces
- stateful single use request
func NewSqlToMgo ¶
NewSqlToMgo create sql to mongo converter
func (*SqlToMgo) WalkExecSource ¶
Click to show internal directories.
Click to hide internal directories.