Boolean schema type.

Hierarchy (View Summary)

Constructors

  • Parameters

    • name: string
    • Optionaloptions: Partial<{ default?: Buffer | () => Buffer; required: boolean }> & {
          encoding?: BufferEncoding;
      }
      • required
      • default
      • encoding
      • Optionalencoding?: BufferEncoding

    Returns default

Properties

default: () => Buffer
name: string = ''
options: { default?: Buffer | () => Buffer; required: boolean } & {
    encoding: BufferEncoding;
}
q$exists: (value: unknown, query: unknown, data?: unknown) => boolean

Type declaration

    • (value: unknown, query: unknown, data?: unknown): boolean
    • Checks the existance of data.

      Parameters

      • value: unknown
      • query: unknown
      • Optionaldata: unknown

      Returns boolean

q$max: (value: unknown, query: unknown, data?: unknown) => boolean

Type declaration

    • (value: unknown, query: unknown, data?: unknown): boolean
    • Checks whether value is less than or equal to (i.e. <=) the query.

      Parameters

      • value: unknown
      • query: unknown
      • Optionaldata: unknown

      Returns boolean

q$min: (value: unknown, query: unknown, data?: unknown) => boolean

Type declaration

    • (value: unknown, query: unknown, data?: unknown): boolean
    • Checks whether value is greater than or equal to (i.e. >=) the query.

      Parameters

      • value: unknown
      • query: unknown
      • Optionaldata: unknown

      Returns boolean

Methods

  • Casts data.

    Parameters

    • value_: WithImplicitCoercion<string | Uint8Array | readonly number[]>
    • Optionaldata: unknown

    Returns Buffer

  • Casts data.

    Parameters

    • Optionalvalue_: unknown
    • Optionaldata: unknown

    Returns Buffer

  • Compares between two buffers.

    Parameters

    • Optionala: Buffer
    • Optionalb: Buffer

    Returns number

  • Checks the equality of data.

    Parameters

    • value: Buffer
    • query: Buffer

    Returns boolean

  • Parses data and transform them into buffer values.

    Parameters

    • value: WithImplicitCoercion<string | Uint8Array | readonly number[]>

    Returns Buffer

  • Parses data and transform them into buffer values.

    Parameters

    • Optionalvalue: unknown

    Returns Buffer

  • Checks the existance of data.

    Parameters

    • value: unknown
    • query: unknown
    • Optionaldata: unknown

    Returns boolean

  • Checks whether value is greater than (i.e. >) the query.

    Parameters

    • value: unknown
    • query: unknown
    • Optionaldata: unknown

    Returns boolean

  • Checks whether value is greater than or equal to (i.e. >=) the query.

    Parameters

    • value: unknown
    • query: unknown
    • Optionaldata: unknown

    Returns boolean

  • Checks whether value is equal to one of elements in query.

    Parameters

    • value: unknown
    • query: unknown[]
    • Optionaldata: unknown

    Returns boolean

  • Checks whether value is less than (i.e. <) the query.

    Parameters

    • value: unknown
    • query: unknown
    • Optionaldata: unknown

    Returns boolean

  • Checks whether value is less than or equal to (i.e. <=) the query.

    Parameters

    • value: unknown
    • query: unknown
    • Optionaldata: unknown

    Returns boolean

  • Checks the equality of data. Returns true if the value doesn't match.

    Parameters

    • value: Buffer
    • query: unknown
    • Optionaldata: unknown

    Returns boolean

  • Checks whether value is not equal to any elements in query.

    Parameters

    • value: unknown
    • query: unknown[]
    • Optionaldata: unknown

    Returns boolean

  • Renames a field.

    Parameters

    • value: unknown
    • update: string
    • data: unknown

    Returns void

  • Sets the value.

    Type Parameters

    • T

    Parameters

    • value: unknown
    • update: T
    • Optionaldata: unknown

    Returns T

  • Unsets the value.

    Type Parameters

    • T

    Parameters

    • value: T
    • update: boolean
    • Optionaldata: unknown

    Returns T

  • Validates data.

    Parameters

    • value_: unknown
    • Optionaldata: unknown

    Returns Buffer

  • Transforms data into number to compress the size of database files.

    Parameters

    • Optionalvalue: Buffer

    Returns string