Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Interfaces

Type aliases

Functions

Type aliases

BasicWhereFilter

BasicWhereFilter: Exclude<FirestoreWhereFilterOp, "array-contains" | "in">

Functions

where

  • where<Model, Key>(field: Key | [Key], filter: BasicWhereFilter, value: Model[Key]): WhereQuery<Model>
  • where<Model, Key, ValueArray, ValueType>(field: Key | [Key], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key>(field: Key | [Key], filter: "in", value: Model[Key][]): WhereQuery<Model>
  • where<Model, Key1, Key2>(field: [Key1, Key2], filter: BasicWhereFilter, value: Model[Key1][Key2]): WhereQuery<Model>
  • where<Model, Key1, Key2, ValueArray, ValueType>(field: [Key1, Key2], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2>(field: [Key1, Key2], filter: "in", value: Model[Key1][Key2][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3>(field: [Key1, Key2, Key3], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, ValueArray, ValueType>(field: [Key1, Key2, Key3], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3>(field: [Key1, Key2, Key3], filter: "in", value: Model[Key1][Key2][Key3][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4>(field: [Key1, Key2, Key3, Key4], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4>(field: [Key1, Key2, Key3, Key4], filter: "in", value: Model[Key1][Key2][Key3][Key4][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5>(field: [Key1, Key2, Key3, Key4, Key5], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4][Key5]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4, Key5], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5>(field: [Key1, Key2, Key3, Key4, Key5], filter: "in", value: Model[Key1][Key2][Key3][Key4][Key5][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6>(field: [Key1, Key2, Key3, Key4, Key5, Key6], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4][Key5][Key6]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4, Key5, Key6], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6>(field: [Key1, Key2, Key3, Key4, Key5, Key6], filter: "in", value: Model[Key1][Key2][Key3][Key4][Key5][Key6][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7], filter: "in", value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8], filter: "in", value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9], filter: "array-contains", value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9], filter: "in", value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10], filter: BasicWhereFilter, value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][Key10]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, ValueArray, ValueType>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10], filter: BasicWhereFilter, value: ValueArray[ValueType]): WhereQuery<Model>
  • where<Model, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10>(field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10], filter: "in", value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][Key10][]): WhereQuery<Model>
  • 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'])

    Type parameters

    • Model

    • Key: keyof Model

    Parameters

    • field: Key | [Key]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key: keyof Model

    • ValueArray: Model[Key]

    • ValueType: keyof ValueArray

    Parameters

    • field: Key | [Key]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key: keyof Model

    Parameters

    • field: Key | [Key]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    Parameters

    • field: [Key1, Key2]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • ValueArray: Model[Key1][Key2]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    Parameters

    • field: [Key1, Key2]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    Parameters

    • field: [Key1, Key2, Key3]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • ValueArray: Model[Key1][Key2][Key3]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    Parameters

    • field: [Key1, Key2, Key3]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    Parameters

    • field: [Key1, Key2, Key3, Key4]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • ValueArray: Model[Key1][Key2][Key3][Key4]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    Parameters

    • field: [Key1, Key2, Key3, Key4]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • ValueArray: Model[Key1][Key2][Key3][Key4][Key5]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • ValueArray: Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • ValueArray: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • ValueArray: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • Key9: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • Key9: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    • ValueArray: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9]

      The field or key path to query

    • filter: "array-contains"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • Key9: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • Key9: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    • Key10: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][Key10]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • Key9: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    • Key10: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9]

    • ValueArray: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][Key10]

    • ValueType: keyof ValueArray

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10]

      The field or key path to query

    • filter: BasicWhereFilter

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: ValueArray[ValueType]

      The value to pass to the operation

    Returns WhereQuery<Model>

    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'])

    Type parameters

    • Model

    • Key1: keyof Model

    • Key2: keyof Model[Key1]

    • Key3: keyof Model[Key1][Key2]

    • Key4: keyof Model[Key1][Key2][Key3]

    • Key5: keyof Model[Key1][Key2][Key3][Key4]

    • Key6: keyof Model[Key1][Key2][Key3][Key4][Key5]

    • Key7: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6]

    • Key8: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7]

    • Key9: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8]

    • Key10: keyof Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9]

    Parameters

    • field: [Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10]

      The field or key path to query

    • filter: "in"

      The filter operation ('<', '<=', '==', '>=', '>', 'array-contains', 'in' or 'array-contains-any')

    • value: Model[Key1][Key2][Key3][Key4][Key5][Key6][Key7][Key8][Key9][Key10][]

      The value to pass to the operation

    Returns WhereQuery<Model>

    The where query object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc