datatables.net-editor-server
    Preparing search index...

    Class StateRestore

    Index

    Constructors

    • Constructor

      Parameters

      • db: Knex

        Database connector

      • Optionaltable: string

        Database table name for where the states will be stored

      • Optionalpkey: string

        Primary key column name for that table

      Returns StateRestore

    Methods

    • Get the column name for the default state flag

      Returns string

    • Set the column name for the default state flag

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for the table's primary key

      Returns string

    • Set the column name for the table's primary key

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for the state's name

      Returns string

    • Set the column name for the state's name

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for the URL (path) of where the state applied

      Returns string

    • Set the column name for the URL (path) of where the state applied

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for the shared flag

      Returns string

    • Set the column name for the shared flag

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for where the state itself is stored

      Returns string

    • Set the column name for where the state itself is stored

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for where the name of the host DataTable stored

      Returns string

    • Set the column name for where the name of the host DataTable stored

      Parameters

      • column: string

        Column name

      Returns this

    • Get the column name for the name of the column where the user identifier is stored.

      Returns string

    • Set the column name for the name of the column where the user identifier is stored.

      Parameters

      • column: string

        Column name

      Returns this

    • Get the database connection assigned to the instance.

      Returns Knex

      Knex db interface

    • Set the database connection.

      Parameters

      • db: Knex

        Knex db interface

      Returns this

      Self for chaining

    • Get extra column name / value properties to store in the db

      Returns Record<string, any>

    • Set the column name / value properties to store in the db as part of the state. Note that they are not read back from the db as part of loading the state list.

      Parameters

      • set: Record<string, any>

        Column name / value pairs

      Returns this

    • Get the database table name that will be used for the state storage.

      Returns string

    • Set the database table name that will be used for state storage.

      Parameters

      • name: string

        Table name

      Returns this

    • Get the value for the current user identifier. This is usually a user id, but it could be any other unique identifier.

      Returns string

    • Set the value for the current user identifier. This is usually a user id, but it could be any other unique identifier.

      Parameters

      • name: string

        User ID

      Returns this

    • Get the array of conditions applied to the instance.

      Returns Where<any, unknown>[]

      Knex where conditions.

    • Set a condition for the queries Editor will perform. Editor uses Knex to connect to the database, and exposes the knex object using this method so you can add any conditions you like that are supported by Knex.

      Parameters

      • ...cond: Where<any, unknown>[]

        Knex query condition

      Returns this

      Self for chaining.