The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus'
type User = { name: string }
type Order = { user: Ref<User>, item: string }
const users = collection<User>('users')
const orders = collection<User>('orders')
query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')])
.then(userOrders => {
console.log(userOrders.length)
//=> 42
})
// Or using key paths:
query(orders, [where(['address', 'city'], '==', 'Moscow'])
The field or key path to query
The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')
The value to pass to the operation
The where query object
Generated using TypeDoc
Creates where query.
import { where, ref, query, collection, Ref } from 'typesaurus' type User = { name: string } type Order = { user: Ref<User>, item: string } const users = collection<User>('users') const orders = collection<User>('orders') query(orders, [where('user', '==', ref(users, '00sHm46UWKObv2W7XK9e')]) .then(userOrders => { console.log(userOrders.length) //=> 42 }) // Or using key paths: query(orders, [where(['address', 'city'], '==', 'Moscow'])