API Docs for:
Show:

QueryInterface Class

Returns an object that treats SQLite's inabilities to do certain queries.

Methods

changeColumn

(
  • tableName
  • attributes
  • emitter
  • queryAndEmit
)

Defined in lib/dialects/sqlite/query-interface.js:40

Available since 1.6.0

A wrapper that fixes SQLite's inability to change columns from existing tables. It will create a backup of the table, drop the table afterwards and create a new table with the same name but with a modified version of the respective column.

Parameters:

  • tableName String

    The name of the table.

  • attributes Object

    An object with the attribute's name as key and it's options as value object.

  • emitter CustomEventEmitter

    The EventEmitter from outside.

  • queryAndEmit Function

    The function from outside that triggers some events to get triggered.

removeColumn

(
  • tableName
  • attributeName
  • emitter
  • queryAndEmit
)

Defined in lib/dialects/sqlite/query-interface.js:10

Available since 1.6.0

A wrapper that fixes SQLite's inability to remove columns from existing tables. It will create a backup of the table, drop the table afterwards and create a new table with the same name but without the obsolete column.

Parameters:

  • tableName String

    The name of the table.

  • attributeName String

    The name of the attribute that we want to remove.

  • emitter CustomEventEmitter

    The EventEmitter from outside.

  • queryAndEmit Function

    The function from outside that triggers some events to get triggered.

renameColumn

(
  • tableName
  • attrNameBefore
  • attrNameAfter
  • emitter
  • queryAndEmit
)

Defined in lib/dialects/sqlite/query-interface.js:72

Available since 1.6.0

A wrapper that fixes SQLite's inability to rename columns from existing tables. It will create a backup of the table, drop the table afterwards and create a new table with the same name but with a renamed version of the respective column.

Parameters:

  • tableName String

    The name of the table.

  • attrNameBefore String

    The name of the attribute before it was renamed.

  • attrNameAfter String

    The name of the attribute after it was renamed.

  • emitter CustomEventEmitter

    The EventEmitter from outside.

  • queryAndEmit Function

    The function from outside that triggers some events to get triggered.