Documentation
¶
Index ¶
- func ArrayValue(a types.Array) expr.LiteralValue
- func BlobValue(v []byte) expr.LiteralValue
- func BoolValue(v bool) expr.LiteralValue
- func CloneDocument(t testing.TB, d types.Document) *document.FieldBuffer
- func DocumentValue(d types.Document) expr.LiteralValue
- func DoubleValue(v float64) expr.LiteralValue
- func Dump(t testing.TB, v interface{})
- func Exec(db *database.Database, tx *database.Transaction, q string, ...) error
- func ExprList(t testing.TB, s string) expr.LiteralExprList
- func ExprRunner(t *testing.T, testfile string)
- func FunctionExpr(t testing.TB, name string, args ...expr.Expr) expr.Expr
- func Int64Ptr(n int64) *int64
- func IntegerValue(v int64) expr.LiteralValue
- func IteratorToJSONArray(w io.Writer, s document.Iterator) error
- func LoadCatalog(t testing.TB, db *database.Database)
- func MakeArray(t testing.TB, jsonArray string) types.Array
- func MakeArrayValue(t testing.TB, vs ...interface{}) types.Value
- func MakeDocument(t testing.TB, jsonDoc string) types.Document
- func MakeValue(t testing.TB, v interface{}) types.Value
- func MakeValueBuffer(t testing.TB, jsonArray string) *document.ValueBuffer
- func MustExec(t *testing.T, db *database.Database, tx *database.Transaction, q string, ...)
- func MustQuery(t *testing.T, db *database.Database, tx *database.Transaction, q string, ...) *statement.Result
- func NewKey(t testing.TB, values ...types.Value) tree.Key
- func NewTestDB(t testing.TB) (*database.Database, func())
- func NewTestDBWithEngine(t testing.TB, ng engine.Engine) (*database.Database, func())
- func NewTestStore(t testing.TB, name string) engine.Store
- func NewTestTx(t testing.TB) (*database.Database, *database.Transaction, func())
- func NullValue() expr.LiteralValue
- func ParseDocumentPath(t testing.TB, p string) document.Path
- func ParseDocumentPaths(t testing.TB, str ...string) []document.Path
- func ParseExpr(t testing.TB, s string) expr.Expr
- func ParseNamedExpr(t testing.TB, s string, name ...string) expr.Expr
- func ParsePath(t testing.TB, p string) expr.Path
- func Query(db *database.Database, tx *database.Transaction, q string, ...) (*statement.Result, error)
- func RequireDocEqual(t testing.TB, d1, d2 types.Document)
- func RequireDocJSONEq(t testing.TB, d types.Document, expected string)
- func RequireStreamEq(t *testing.T, raw string, res *genji.Result, sorted bool)
- func RequireStreamEqf(t *testing.T, raw string, res *genji.Result, sorted bool, msg string, ...)
- func TestExpr(t testing.TB, exprStr string, env *environment.Environment, want types.Value, ...)
- func TextValue(v string) expr.LiteralValue
- type Docs
- type KV
- type ResultStream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayValue ¶
func ArrayValue(a types.Array) expr.LiteralValue
ArrayValue creates a literal value of type Array.
func BlobValue ¶
func BlobValue(v []byte) expr.LiteralValue
BlobValue creates a literal value of type Blob.
func BoolValue ¶
func BoolValue(v bool) expr.LiteralValue
BoolValue creates a literal value of type Bool.
func CloneDocument ¶ added in v0.14.0
func DocumentValue ¶
func DocumentValue(d types.Document) expr.LiteralValue
DocumentValue creates a literal value of type Document.
func DoubleValue ¶
func DoubleValue(v float64) expr.LiteralValue
DoubleValue creates a literal value of type Double.
func Exec ¶
func Exec(db *database.Database, tx *database.Transaction, q string, params ...environment.Param) error
func ExprRunner ¶
func IntegerValue ¶
func IntegerValue(v int64) expr.LiteralValue
IntegerValue creates a literal value of type Integer.
func IteratorToJSONArray ¶
IteratorToJSONArray encodes all the documents of an iterator to a JSON array.
func MakeDocument ¶
MakeDocument creates a document from a json string.
func MakeValueBuffer ¶
func MakeValueBuffer(t testing.TB, jsonArray string) *document.ValueBuffer
func MustExec ¶
func MustExec(t *testing.T, db *database.Database, tx *database.Transaction, q string, params ...environment.Param)
func NewTestDBWithEngine ¶ added in v0.14.0
func ParseDocumentPaths ¶ added in v0.14.0
func Query ¶
func Query(db *database.Database, tx *database.Transaction, q string, params ...environment.Param) (*statement.Result, error)
func RequireStreamEq ¶
func RequireStreamEqf ¶ added in v0.14.0
func TestExpr ¶
func TestExpr(t testing.TB, exprStr string, env *environment.Environment, want types.Value, fails bool)
func TextValue ¶
func TextValue(v string) expr.LiteralValue
TextValue creates a literal value of type Text.
Types ¶
type Docs ¶
func MakeDocuments ¶
MakeDocuments creates a slice of document from json strings.
type KV ¶
type KV struct {
Key, Value []byte
}
KV is used to represent key-value pairs stored in tables or indexes.
type ResultStream ¶
func ParseResultStream ¶
func ParseResultStream(stream string) *ResultStream
Click to show internal directories.
Click to hide internal directories.