From 295714f78d020cf2b486143ee381dac4a8d747ef Mon Sep 17 00:00:00 2001
From: Jon Anderson Before the type list, a variable can be given a name. This name is
used to reference the variable in subsequent queries, allowing for index indirection.Variables & Schemas
/user(21,"",nil)="nothing"
/index("cars",<varName:int>)
/data(:varName,...)
/user(33,"mazda")=nil
@@ -292,13 +292,13 @@ Basic Queries
Go code are included to show how the queries interact with the FDB
API.
Mutations
- Queries lacking variables and the
+
Queries lacking variables and the
...
token perform mutations on the database by either
writing or clearing a key-value.
Queries lacking a value altogether imply an empty variable as the value and should not be confused
- with mutation queries.
+ href="#variables-schemas">variable as the value and should not be
+ confused with mutation queries.
Mutation queries with a data element
as their value perform a write operation.
@@ -332,16 +332,16 @@ Mutations
return nil, nil
})
Queries containing a variable or the
- ...
token read one or more key-values. The query defines
- a schema which the returned key-values must conform to.
Queries containing a variable or
+ the ...
token read one or more key-values. The query
+ defines a schema which the returned key-values must conform to.
If the variable or ...
token only appears in the
query’s value, then it returns a single key-value, if one matching the
schema exists.
Queries lacking a value altogether imply an empty variable as the value, and are therefore read - queries.
+ href="#variables-schemas">variable as the value, and are therefore + read queries.
/my/dir(99.8,7dfb10d1-2493-4fb5-928e-889fdc6a7136)=<int|str>
db.ReadTransact(func(tr fdb.ReadTransaction) (interface{}, error) {
@@ -387,7 +387,7 @@ Reads
// No value decoding...
return tr.MustGet(dir.Pack(tuple.Tuple{10139})), nil
})
- Queries with variables or the +
Queries with variables or the
...
token in their key (and optionally in their value)
result in a range of key-values being read.
/people("coders",...)
diff --git a/docs/index.md b/docs/index.md
index c483a87..abadad9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -248,8 +248,7 @@ element types.
Before the type list, a variable can be given a name. This
name is used to reference the variable in subsequent
-queries, allowing for [index
-indirection](#index-indirection).
+queries, allowing for [index indirection](#indirection).
```language-fql {.query}
/index("cars",