sqlite

Execute a batch of SQLite statements and return results for all of them

post/v1/sqlite/batch

Request

  • Base URL
    https://api.val.town
  • URL
    https://api.val.town/v1/sqlite/batch
  • Auth
    HTTP bearer

Request body

mode'write' | 'read' | 'deferred'

Response

Array of results from the statements executed

columnsstring[] required

Names of columns.

Names of columns can be defined using the AS keyword in SQL:

SELECT author AS author, COUNT(*) AS count FROM books GROUP BY author
columnTypesstring[] required

Types of columns.

The types are currently shown for types declared in a SQL table. For column types of function calls, for example, an empty string is returned.

rowsAffectednumber required

Number of rows that were affected by an UPDATE, INSERT or DELETE operation.

This value is not specified for other SQL statements.

Changes

    • breaking

      removed subschema #1 subschema #2 from the /// request property anyOf list

    • warning

      the // request property's maxLength was set to 100000

    • warning

      the /// request property's maxLength was set to 100000

    • info

      added subschema #1 subschema #2 to the /// request property anyOf list

    • breaking

      the request property type changed from string to no type