PageSourceSearch

https://airsdk.dev/assets/js/557bf77b.f376b208.js

js airsdk.dev collected 2026-10-03 21:02:19 UTC 93,044 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkairsdk_dev=globalThis.webpackChunkairsdk_dev||[]).push([[2636],{42e3(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"development/appendixes/sql-support-in-local-databases/supported-sql-syntax","title":"Supported SQL syntax","description":"The following SQL syntax listings are supported by the Adobe AIR SQL database","source":"@site/docs/development/appendixes/sql-support-in-local-databases/supported-sql-syntax.md","sourceDirName":"development/appendixes/sql-support-in-local-databases","slug":"/development/appendixes/sql-support-in-local-databases/supported-sql-syntax","permalink":"/docs/development/appendixes/sql-support-in-local-databases/supported-sql-syntax","draft":false,"unlisted":false,"editUrl":"https://github.com/airsdk/airsdk.dev/edit/main/docs/development/appendixes/sql-support-in-local-databases/supported-sql-syntax.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"mainSidebar","previous":{"title":"SQL support in local databases","permalink":"/docs/development/appendixes/sql-support-in-local-databases/"},"next":{"title":"Data type support","permalink":"/docs/development/appendixes/sql-support-in-local-databases/data-type-support"}}');var a=t(74848),i=t(28453);const r={sidebar_position:1},o="Supported SQL syntax",l={},d=[{value:"General SQL syntax",id:"general-sql-syntax",level:2},{value:"Data manipulation statements",id:"data-manipulation-statements",level:2},{value:"INSERT",id:"insert",level:4},{value:"UPDATE",id:"update",level:4},{value:"DELETE",id:"delete",level:4},{value:"Data definition statements",id:"data-definition-statements",level:2},{value:"CREATE TABLE",id:"create-table",level:4},{value:"ALTER TABLE",id:"alter-table",level:4},{value:"DROP TABLE",id:"drop-table",level:4},{value:"CREATE INDEX",id:"create-index",level:4},{value:"DROP INDEX",id:"drop-index",level:4},{value:"CREATE VIEW",id:"create-view",level:4},{value:"DROP VIEW",id:"drop-view",level:4},{value:"CREATE TRIGGER",id:"create-trigger",level:4},{value:"RAISE () function",id:"raise--function",level:4},{value:"DROP TRIGGER",id:"drop-trigger",level:4},{value:"Special statements and clauses",id:"special-statements-and-clauses",level:2},{value:"COLLATE",id:"collate",level:4},{value:"EXPLAIN",id:"explain",level:4},{value:"ON CONFLICT (conflict algorithms)",id:"on-conflict-conflict-algorithms",level:4},{value:"REINDEX",id:"reindex",level:4},{value:"COMMENTS",id:"comments",level:4},{value:"EXPRESSIONS",id:"expressions",level:4},{value:"Literal values",id:"literal-values",level:4},{value:"Column name",id:"column-name",level:4},{value:"SELECT statement",id:"select-statement",level:4},{value:"CAST expression",id:"cast-expression",level:4},{value:"Additional expression elements",id:"additional-expression-elements",level:4},{value:"Built-in functions",id:"built-in-functions",level:2},{value:"Aggregate functions",id:"aggregate-functions",level:4},{value:"Scalar functions",id:"scalar-functions",level:4},{value:"Date and time formatting functions",id:"date-and-time-formatting-functions",level:4},{value:"Time formats",id:"time-formats",level:4},{value:"Modifiers",id:"modifiers",level:4},{value:"Operators",id:"operators",level:2},{value:"Common operators",id:"common-operators",level:4},{value:"SQL operators",id:"sql-operators",level:4},{value:"Parameters",id:"parameters",level:2},{value:"Unsupported SQL features",id:"unsupported-sql-features",level:2},{value:"Additional SQL features",id:"additional-sql-features",level:2}];function h(e){const n={a:"a",br:"br",code:"code",h1:"h1",h2:"h2",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"supported-sql-syntax",children:"Supported SQL syntax"})}),"\n",(0,a.jsx)(n.p,{children:"The following SQL syntax listings are supported by the Adobe AIR SQL database\nengine. The listings are divided into explanations of different statement and\nclause types, expressions, built-in functions, and operators. The following\ntopics are covered:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"General SQL syntax"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Data manipulation statements (SELECT, INSERT, UPDATE, and DELET
1E)"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Data definition statements (CREATE, ALTER, and DROP statements for tables,\nindices, views, and triggers)"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Special statements and clauses"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Built-in functions (Aggregate, scalar, and date/time formatting functions)"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Operators"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Parameters"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Unsupported SQL features"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Additional SQL features"}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"general-sql-syntax",children:"General SQL syntax"}),"\n",(0,a.jsx)(n.p,{children:"In addition to the specific syntax for various statements and expressions, the\nfollowing are general rules of SQL syntax:"}),"\n",(0,a.jsxs)(n.p,{children:["Case sensitivity",(0,a.jsx)(n.br,{}),"\n","SQL statements, including object names, are not case sensitive. Nevertheless,\nSQL statements are frequently written with SQL keywords written in uppercase,\nand this document uses that convention. While SQL syntax is not case sensitive,\nliteral text values in SQL are case sensitive, and comparison and sorting\noperations can be case sensitive, as specified by the collation sequence defined\nfor a column or operation. For more information see COLLATE."]}),"\n",(0,a.jsxs)(n.p,{children:["White space",(0,a.jsx)(n.br,{}),"\n","A white-space character (such as space, tab, new line, and so forth) must be\nused to separate individual words in an SQL statement. However, white space is\noptional between words and symbols. The type and quantity of white-space\ncharacters in a SQL statement is not significant. You can use white space, such\nas indenting and line breaks, to format your SQL statements for easy\nreadability, without affecting the meaning of the statement."]}),"\n",(0,a.jsx)(n.h2,{id:"data-manipulation-statements",children:"Data manipulation statements"}),"\n",(0,a.jsx)(n.p,{children:"Data manipulation statements are the most commonly used SQL statements. These\nstatements are used to retrieve, add, modify, and remove data from database\ntables. The following data manipulation statements are supported: SELECT,\nINSERT, UPDATE, and DELETE."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"SELECT"})}),"\n",(0,a.jsx)(n.p,{children:"The SELECT statement is used to query the database. The result of a SELECT is\nzero or more rows of data where each row has a fixed number of columns. The\nnumber of columns in the result is specified by the result column name or\nexpression list between the SELECT and optional FROM keywords."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement   ::=  SELECT [ALL | DISTINCT] result\n"})}),"\n",(0,a.jsx)(n.p,{children:"[FROM table-list]\n[WHERE expr]\n[GROUP BY expr-list]\n[HAVING expr]\n[compound-op select-statement]*\n[ORDER BY sort-expr-list]\n[LIMIT integer [( OFFSET | , ) integer]]"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"result          ::=  result-column [, result-column]*\nresult-column   ::=  * | table-name . * | expr [[AS] string]\ntable-list      ::=  table [ join-op table join-args ]*\ntable           ::=  table-name [AS alias] |\n"})}),"\n",(0,a.jsx)(n.p,{children:"( select ) [AS alias]"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"join-op         ::=  , | [NATURAL] [LEFT | RIGHT | FULL] [OUTER | INNER | CROSS] JOIN\njoin-args       ::=  [ON expr] [USING ( id-list )]\ncompound-op     ::=  UNION | UNION ALL | INTERSECT | EXCEPT\nsort-expr-list  ::=  expr [sort-order] [, expr [sort-order]]*\nsort-order      ::=  [COLLATE collation-name] [ASC | DESC]\ncollation-name  ::=  BINARY | NOCASE\n"})}),"\n",(0,a.jsx)(n.p,{children:"Any arbitrary expression can be used as a result. If a result expression is *\nthen all columns of all tables are substituted for that one expression. If the\nexpression is the name of a table followed by .* then the result is all columns\nin that one table."}),"\n",(0,a.jsx)(n.p,{children:"The DISTINCT keyword causes a subset of result rows to be returned, in which\neach result row is different. NULL values are not treated as distinct from each\nother. The default behavior is that all result rows are returned, which can be\nmade explicit with the keyword ALL."}),"\n",(0,a.jsx)(n.p,{children:"The query is executed against one or more tables specified after the FROM\nkeyword. If multiple table names are separated by commas, then the query uses\nthe cross join of the various tables. The JOIN syntax can also be used to\nspecify how tables are joined. The only type of outer join that is supported is\nLEFT OUTER JOIN. The ON clause expression in join-args must resolve to a boolean\nvalue. A subquery in parentheses may be used as a table in the FROM clause. The\nentire FROM clause may be omitted, in 
1which case the result is a single row\nconsisting of the values of the result expression list."}),"\n",(0,a.jsx)(n.p,{children:"The WHERE clause is used to limit the number of rows the query retrieves. WHERE\nclause expressions must resolve to a boolean value. WHERE clause filtering is\nperformed before any grouping, so WHERE clause expressions may not include\naggregate functions."}),"\n",(0,a.jsx)(n.p,{children:"The GROUP BY clause causes one or more rows of the result to be combined into a\nsingle row of output. A GROUP BY clause is especially useful when the result\ncontains aggregate functions. The expressions in the GROUP BY clause do not have\nto be expressions that appear in the SELECT expression list."}),"\n",(0,a.jsx)(n.p,{children:"The HAVING clause is like WHERE in that it limits the rows returned by the\nstatement. However, the HAVING clause applies after any grouping specified by a\nGROUP BY clause has occurred. Consequently, the HAVING expression may refer to\nvalues that include aggregate functions. A HAVING clause expression is not\nrequired to appear in the SELECT list. Like a WHERE expression, a HAVING\nexpression must resolve to a boolean value."}),"\n",(0,a.jsx)(n.p,{children:"The ORDER BY clause causes the output rows to be sorted. The sort-expr-list\nargument to the ORDER BY clause is a list of expressions that are used as the\nkey for the sort. The expressions do not have to be part of the result for a\nsimple SELECT, but in a compound SELECT (a SELECT using one of the compound-op\noperators) each sort expression must exactly match one of the result columns.\nEach sort expression may be optionally followed by a sort-order clause\nconsisting of the COLLATE keyword and the name of a collation function used for\nordering text and/or the keyword ASC or DESC to specify the sort order\n(ascending or descending). The sort-order can be omitted and the default\n(ascending order) is used. For a definition of the COLLATE clause and collation\nfunctions, see COLLATE."}),"\n",(0,a.jsx)(n.p,{children:"The LIMIT clause places an upper bound on the number of rows returned in the\nresult. A negative LIMIT indicates no upper bound. The optional OFFSET following\nLIMIT specifies how many rows to skip at the beginning of the result set. In a\ncompound SELECT query, the LIMIT clause may only appear after the final SELECT\nstatement, and the limit is applied to the entire query. Note that if the OFFSET\nkeyword is used in the LIMIT clause, then the limit is the first integer and the\noffset is the second integer. If a comma is used instead of the OFFSET keyword,\nthen the offset is the first number and the limit is the second number. This\nseeming contradiction is intentional \u2014 it maximizes compatibility with legacy\nSQL database systems."}),"\n",(0,a.jsx)(n.p,{children:"A compound SELECT is formed from two or more simple SELECT statements connected\nby one of the operators UNION, UNION ALL, INTERSECT, or EXCEPT. In a compound\nSELECT, all the constituent SELECT statements must specify the same number of\nresult columns. There can only be a single ORDER BY clause after the final\nSELECT statement (and before the single LIMIT clause, if one is specified). The\nUNION and UNION ALL operators combine the results of the preceding and following\nSELECT statements into a single table. The difference is that in UNION, all\nresult rows are distinct, but in UNION ALL, there may be duplicates. The\nINTERSECT operator takes the intersection of the results of the preceding and\nfollowing SELECT statements. EXCEPT takes the result of preceding SELECT after\nremoving the results of the following SELECT. When three or more SELECT\nstatements are connected into a compound, they group from first to last."}),"\n",(0,a.jsx)(n.p,{children:"For a definition of permitted expressions, see Expressions."}),"\n",(0,a.jsx)(n.p,{children:"Starting with AIR 2.5, the SQL CAST operator is supported when reading to\nconvert BLOB data to ActionScript ByteArray objects. For example, the following\ncode reads raw data that is not stored in the AMF format and stores it in a\nByteArray object:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:'stmt.text = "SELECT CAST(data AS ByteArray) AS data FROM pictures;";\nstmt.execute();\nvar result:SQLResult = stmt.getResult();\nvar bytes:ByteArray = result.data[0].data;\n'})}),"\n",(0,a.jsx)(n.h4,{id:"insert",children:"INSERT"}),"\n",(0,a.jsx)(n.p,{children:"The INSERT statement comes in two basic forms and is used to populate tables\nwith data."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  INSERT [OR conflict-algorithm] INTO [database-name.] table-name [(column-list)] VALUES (value-list) |\n"})}),"\n",(0,a.jsx)(n.p,{children:"INSERT [OR conflict-algorithm] INTO [database-name.] table-name [(column-list)] select-statement\nREPLACE INTO [database-name.] table-name [(column-list)] VALUES (value-list) |\n
1REPLACE INTO [database-name.] table-name [(column-list)] select-statement"}),"\n",(0,a.jsx)(n.p,{children:"The first form (with the VALUES keyword) creates a single new row in an existing\ntable. If no column-list is specified then the number of values must be the same\nas the number of columns in the table. If a column-list is specified, then the\nnumber of values must match the number of specified columns. Columns of the\ntable that do not appear in the column list are filled with the default value\ndefined when the table is created, or with NULL if no default value is defined."}),"\n",(0,a.jsx)(n.p,{children:"The second form of the INSERT statement takes its data from a SELECT statement.\nThe number of columns in the result of the SELECT must exactly match the number\nof columns in the table if column-list is not specified, or it must match the\nnumber of columns named in the column-list. A new entry is made in the table for\nevery row of the SELECT result. The SELECT may be simple or compound. For a\ndefinition of allowable SELECT statements, see SELECT."}),"\n",(0,a.jsxs)(n.p,{children:["The optional conflict-algorithm allows the specification of an alternative\nconstraint conflict resolution algorithm to use during this one command. For an\nexplanation and definition of conflict algorithms, see\n",(0,a.jsx)(n.a,{href:"#special-statements-and-clauses",children:"Special statements and clauses"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"The two REPLACE INTO forms of the statement are equivalent to using the standard\nINSERT [OR conflict-algorithm] form with the REPLACE conflict algorithm (i.e.\nthe INSERT OR REPLACE... form)."}),"\n",(0,a.jsx)(n.p,{children:"The two REPLACE INTO forms of the statement are equivalent to using the standard\nINSERT [OR conflict-algorithm] form with the REPLACE conflict algorithm (i.e.\nthe INSERT OR REPLACE... form)."}),"\n",(0,a.jsx)(n.h4,{id:"update",children:"UPDATE"}),"\n",(0,a.jsx)(n.p,{children:"The update command changes the existing records in a table."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  UPDATE [database-name.] table-name SET column1=value1, column2=value2,... [WHERE expr]\n"})}),"\n",(0,a.jsx)(n.p,{children:"The command consists of the UPDATE keyword followed by the name of the table in\nwhich you want to update the records. After the SET keyword, provide the name of\nthe column and the value to which the column to be changed as a comma-separated\nlist. The WHERE clause expression provides the row or rows in which the records\nare updated."}),"\n",(0,a.jsx)(n.h4,{id:"delete",children:"DELETE"}),"\n",(0,a.jsx)(n.p,{children:"The delete command is used to remove records from a table."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  DELETE FROM [database-name.] table-name [WHERE expr]\n"})}),"\n",(0,a.jsx)(n.p,{children:"The command consists of the DELETE FROM keywords followed by the name of the\ntable from which records are to be removed."}),"\n",(0,a.jsx)(n.p,{children:"Without a WHERE clause, all rows of the table are removed. If a WHERE clause is\nsupplied, then only those rows that match the expression are removed. The WHERE\nclause expression must resolve to a boolean value. For a definition of permitted\nexpressions, see Expressions."}),"\n",(0,a.jsx)(n.h2,{id:"data-definition-statements",children:"Data definition statements"}),"\n",(0,a.jsx)(n.p,{children:"Data definition statements are used to create, modify, and remove database\nobjects such as tables, views, indices, and triggers. The following data\ndefinition statements are supported:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Tables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"CREATE TABLE"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"ALTER TABLE"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"DROP TABLE"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Indices:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"CREATE INDEX"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"DROP INDEX"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Views:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"CREATE VIEWS"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"DROP VIEWS"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Triggers:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"CREATE TRIGGERS"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"DROP TRIGGERS"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"create-table",children:"CREATE TABLE"}),"\n",(0,a.jsx)(n.p,{children:"A CREATE TABLE statement consists of the keywords CREATE TABLE followed by the\nname of the new table, then (in parentheses) a list of column definitions and\nconstraints. The table name can be either an identifier or a string."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement       ::=  CREATE [TEMP | TEMPORARY] TABLE [IF NOT EXISTS] [database-name.] table-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"( column-def [, column-def]* [, constraint]* )"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement       ::=  CREATE [TEMP | TEMPORARY] TABLE [database-name.] table-name AS select-statement\ncolumn-def          ::=  name [type] [[CONSTRAINT name] column-constraint]*\ntype                ::=  typename | typename ( number ) | typename ( number , number )\ncolumn-constraint   ::=  NOT NULL [ conflict-clause ] |\n"})}),"\n",(0,a.jsx)(n.p,{children:"PRIMARY KEY [sort-order] [ conflict-clause ] [AUTOINCREMENT] |\nUNIQUE [conflict-clause] |\nCHECK ( expr ) |\nDEFAULT default-value |\nCOLLATE collation-name"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"constraint          ::=  PRIMARY KEY ( column-list ) [conflict-clause] |\n"})}),"\n",(0,a.jsx)(n.p,{children:"UNIQUE ( column-list ) [conflict-clause] |\nCHECK ( expr )"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"conflict-clause     ::=  ON CONFLICT conflict-algorithm\nconflict-algorithm  ::=  ROLLBACK | ABORT | FAIL | IGNORE | REPLACE\ndefault-value       ::=  NULL | string | number | CURRENT_TIME | CURRENT_DATE | CURRENT_TIMESTAMP\nsort-order          ::=  ASC | DESC\ncollation-name      ::=  BINARY | NOCASE\ncolumn-list         ::=  column-name [, column-name]*\n"})}),"\n",(0,a.jsx)(n.p,{children:"Each column definition is the name of the column followed by the data type for\nthat column, then one or more optional column constraints. The data type for the\ncolumn restricts what data may be stored in that column. If an attempt is made\nto store a value in a column with a different data type, the runtime converts\nthe value to the appropriate type if possible, or raises an error. See the Data\ntype support section for additional information."}),"\n",(0,a.jsx)(n.p,{children:"The NOT NULL column constraint indicates that the column cannot contain NULL\nvalues."}),"\n",(0,a.jsx)(n.p,{children:"A UNIQUE constraint causes an index to be created on the specified column or\ncolumns. This index must contain unique keys\u2014no two rows may contain duplicate\nvalues or combinations of values for the specified column or columns. A CREATE\nTABLE statement can have multiple UNIQUE constraints, including multiple columns\nwith a UNIQUE constraint in the column's definition and/or multiple table-level\nUNIQUE constraints."}),"\n",(0,a.jsx)(n.p,{children:"A CHECK constraint defines an expression that is evaluated and must be true in\norder for a row's data to be inserted or updated. The CHECK expression must\nresolve to a boolean value."}),"\n",(0,a.jsx)(n.p,{children:"A COLLATE clause in a column definition specifies what text collation function\nto use when comparing text entr
1ies for the column. The BINARY collating function\nis used by default. For details on the COLLATE clause and collation functions,\nsee COLLATE."}),"\n",(0,a.jsxs)(n.p,{children:["The DEFAULT constraint specifies a default value to use when doing an INSERT.\nThe value may be NULL, a string constant, or a number. The default value may\nalso be one of the special case-independent keywords CURRENT_TIME, CURRENT_DATE\nor CURRENT_TIMESTAMP. If the value is NULL, a string constant, or a number, it\nis literally inserted into the column whenever an INSERT statement does not\nspecify a value for the column. If the value is CURRENT_TIME, CURRENT_DATE or\nCURRENT_TIMESTAMP, then the current UTC date and/or time is inserted into the\ncolumn. For CURRENT_TIME, the format is HH:MM",":SS",". For CURRENT_DATE, the format\nis YYYY-MM-DD. The format for CURRENT_TIMESTAMP is YYYY-MM-DD HH:MM",":SS","."]}),"\n",(0,a.jsx)(n.p,{children:"Specifying a PRIMARY KEY normally just creates a UNIQUE index on the\ncorresponding column or columns. However, if the PRIMARY KEY constraint is on a\nsingle column that has the data type INTEGER (or one of its synonyms such as\nint) then that column is used by the database as the actual primary key for the\ntable. This means that the column may only hold unique integer values. (Note\nthat in many SQLite implementations, only the column type INTEGER causes the\ncolumn to serve as the internal primary key, but in Adobe AIR synonyms for\nINTEGER such as int also specify that behavior.)"}),"\n",(0,a.jsx)(n.p,{children:"If a table does not have an INTEGER PRIMARY KEY column, an integer key is\nautomatically generated when a row is inserted. The primary key for a row can\nalways be accessed using one of the special names ROWID, OID, or _ROWID_.\nThese names can be used regardless of whether it is an explicitly declared\nINTEGER PRIMARY KEY or an internal generated value. However, if the table has an\nexplicit INTEGER PRIMARY KEY, the name of the column in the result data is the\nactual column name rather than the special name."}),"\n",(0,a.jsx)(n.p,{children:"An INTEGER PRIMARY KEY column can also include the keyword AUTOINCREMENT. When\nthe AUTOINCREMENT keyword is used, the database automatically generates and\ninserts a sequentially incremented integer key in the INTEGER PRIMARY KEY column\nwhen it executes an INSERT statement that doesn't specify an explicit value for\nthe column."}),"\n",(0,a.jsx)(n.p,{children:"There can only be one PRIMARY KEY constraint in a CREATE TABLE statement. It can\neither be part of one column's definition or one single table-level PRIMARY KEY\nconstraint. A primary key column is implicitly NOT NULL."}),"\n",(0,a.jsxs)(n.p,{children:["The optional conflict-clause following many constraints allows the specification\nof an alternative default constraint conflict resolution algorithm for that\nconstraint. The default is ABORT. Different constraints within the same table\nmay have different default conflict resolution algorithms. If an INSERT or\nUPDATE statement specifies a different conflict resolution algorithm, that\nalgorithm is used in place of the algorithm specified in the CREATE TABLE\nstatement. See the ON CONFLICT section of\n",(0,a.jsx)(n.a,{href:"#special-statements-and-clauses",children:"Special statements and clauses"})," for additional\ninformation."]}),"\n",(0,a.jsx)(n.p,{children:"Additional constraints, such as FOREIGN KEY constraints, do not result in an\nerror but the runtime ignores them."}),"\n",(0,a.jsx)(n.p,{children:"If the TEMP or TEMPORARY keyword occurs between CREATE and TABLE then the table\nthat is created is only visible within the same database connection\n(SQLConnection instance). It is automatically deleted when the database\nconnection is closed. Any indices created on a temporary table are also\ntemporary. Temporary tables and indices are stored in a separate file distinct\nfrom the main database file."}),"\n",(0,a.jsx)(n.p,{children:"If the optional database-name prefix is specified, then the table is created in\na named database (a database that was connected to the SQLConnection instance by\ncalling the attach() method with the specified database name). It is an error to\nspecify both a database-name prefix and the TEMP keyword, unless the\ndatabase-name prefix is temp. If no database name is specified, and the TEMP\nkeyword is not present, the table is created in the main database (the database\nthat was connected to the SQLConnection instance using the open() or\nopenAsync()method)."}),"\n",(0,a.jsx)(n.p,{children:"There are no arbitrary limits on the number of columns or on the number of\nconstraints in a table. There is also no arbitrary limit on the amount of data\nin a row."}),"\n",(0,a.jsx)(n.p,{children:"The CREATE TABLE AS form defines the table as the result set of a query. The\nnames of the table columns are the names of the columns in the result."}),"\n",(0,a.jsx)(n.p,{children:"If the optional IF NOT EXISTS clause is present and another table with the same\nname already exists, then the database ignores the CREATE TABLE command."}),"\n",(0,a.jsx)(n.p,{children:"A table can be removed using the DROP TABLE statement, and limited changes can\nbe made using the ALTER TABLE statement."}),"\n",(0,a.jsx)(n.h4,{id:"alter-table",children:"ALTER TABLE"}),"\n",(0,a.jsx)(n.p,{children:"The ALTER TABLE command allows the user to rename or add a new column to an\nexisting table. It is not possible to remove a column from a table."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement ::= ALTER TABLE [database-name.] table-name alteration\nalteration    ::= RENAME TO new-table-name\nalteration    ::= ADD [COLUMN] column-def\n"})}),"\n",(0,a.jsx)(n.p,{children:"The RENAME TO syntax is used to rename the table identified by\n[database-name.] table-name to new-table-name. This command cannot be used to\nmove a table between attached databases, only to rename a table within the same\ndatabase."}),"\n",(0,a.jsx)(n.p,{children:"If the table being renamed has triggers or indices, then they remain attached to\nthe table after it has been renamed. However, if there are any view definitions\nor statements executed by triggers that refer to the table being renamed, they\nare not automatically modified to use the new table name. If a renamed table has\nassociated views or triggers, you must manually drop and recreate the triggers\nor view definitions using the new table name."}),"\n",(0,a.jsx)(n.p,{children:"The ADD [COLUMN] syntax is used to add a new column to an existing table. The\nnew column is always appended to the end of the list of existing columns. The\ncolumn-def clause may take any of the forms permissible in a CREATE TABLE\nstatement, with the following restrictions:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"The column may not have a PRIMARY KEY or UNIQUE constraint."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"The column may not have a default value of CURRENT_TIME, CURRENT_DATE or\nCURRENT_TIMESTAMP."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"If a NOT NULL constraint is specified, the column must have a default value\nother than NULL."}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The execution time of the ALTER TABLE statement is not affected by the amount of\ndata in the table."}),"\n",(0,a.jsx)(n.h4,{id:"drop-table",children:"DROP TABLE"}),"\n",(0,a.jsx)(n.p,{children:"The DROP TABLE statement removes a table added with a CREATE TABLE statement.\nThe table with the specified table-name is the table that's dropped. It is\ncompletely removed from the database and the disk file. The table cannot be\nrecovered. All indices associated with the table are also deleted."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  DROP TABLE [IF EXISTS] [database-name.] table-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"By default the DROP TABLE statement does not reduce the size of the database\nfile. Empty space in the database is retained and used in subsequent INSERT\noperations. To remove free space in the database use the SQLConnection.clean()\nmethod. If the autoClean parameter is set to true when the database is initially\ncreated, the space is freed automatically."}),"\n",(0,a.jsx)(n.p,{children:"The optional IF EXISTS clause suppresses the error that would normally result if\nthe table does not exist."}),"\n",(0,a.jsx)(n.h4,{id:"create-index",children:"CREATE INDEX"}),"\n",(0,a.jsx)(n.p,{children:"The CREATE INDEX command consists of the keywords CREATE INDEX followed by the\nname of the new index, the keyword ON, the name of a previously created table\nthat is to be indexed, and a parenthesized list of names of columns in the table\nwhose values are used for the index key."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  CREATE [UNIQUE
1] INDEX [IF NOT EXISTS] [database-name.] index-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"ON table-name ( column-name [, column-name]* )"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"column-name    ::=  name [COLLATE collation-name] [ASC | DESC]\n"})}),"\n",(0,a.jsx)(n.p,{children:"Each column name can be followed by ASC or DESC keywords to indicate sort order,\nbut the sort order designation is ignored by the runtime. Sorting is always done\nin ascending order."}),"\n",(0,a.jsx)(n.p,{children:"The COLLATE clause following each column name defines a collating sequence used\nfor text values in that column. The default collation sequence is the collation\nsequence defined for that column in the CREATE TABLE statement. If no collation\nsequence is specified, the BINARY collation sequence is used. For a definition\nof the COLLATE clause and collation functions see COLLATE."}),"\n",(0,a.jsx)(n.p,{children:"There are no arbitrary limits on the number of indices that can be attached to a\nsingle table. There are also no limits on the number of columns in an index."}),"\n",(0,a.jsx)(n.h4,{id:"drop-index",children:"DROP INDEX"}),"\n",(0,a.jsx)(n.p,{children:"The drop index statement removes an index added with the CREATE INDEX statement.\nThe specified index is completely removed from the database file. The only way\nto recover the index is to reenter the appropriate CREATE INDEX command."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement ::= DROP INDEX [IF EXISTS] [database-name.] index-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"By default the DROP INDEX statement does not reduce the size of the database\nfile. Empty space in the database is retained and used in subsequent INSERT\noperations. To remove free space in the database use the SQLConnection.clean()\nmethod. If the autoClean parameter is set to true when the database is initially\ncreated, the space is freed automatically."}),"\n",(0,a.jsx)(n.h4,{id:"create-view",children:"CREATE VIEW"}),"\n",(0,a.jsx)(n.p,{children:"The CREATE VIEW command assigns a name to a pre-defined SELECT statement. This\nnew name can then be used in a FROM clause of another SELECT statement in place\nof a table name. Views are commonly used to simplify queries by combining a\ncomplex (and frequently used) set of data into a structure that can be used in\nother operations."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement ::= CREATE [TEMP | TEMPORARY] VIEW [IF NOT EXISTS] [database-name.] view-name AS select-statement\n"})}),"\n",(0,a.jsx)(n.p,{children:"If the TEMP or TEMPORARY keyword occurs in between CREATE and VIEW then the view\nthat is created is only visible to the SQLConnection instance that opened the\ndatabase and is automatically deleted when the database is closed."}),"\n",(0,a.jsx)(n.p,{children:"If a [database-name] is specified the view is created in the named database (a\ndatabase that was connected to the SQLConnection instance using the attach()\nmethod, with the specified name argument. It is an error to specify both a\n[database-name] and the TEMP keyword unless the [database-name] is temp. If\nno database name is specified, and the TEMP keyword is not present, the view is\ncreated in the main database (the database that was connected to the\nSQLConnection instance using the open() or openAsync() method)."}),"\n",(0,a.jsx)(n.p,{children:"Views are read only. A DELETE, INSERT, or UPDATE statement cannot be used on a\nview, unless at least one trigger of the associated type (INSTEAD OF DELETE,\nINSTEAD OF INSERT, INSTEAD OF UPDATE) is defined. For information on creating a\ntrigger for a view, see CREATE TRIGGER."}),"\n",(0,a.jsx)(n.p,{children:"A view is removed from a database using the DROP VIEW statement."}),"\n",(0,a.jsx)(n.h4,{id:"drop-view",children:"DROP VIEW"}),"\n",(0,a.jsx)(n.p,{children:"The DROP VIEW statement removes a view created by a CREATE VIEW statement."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement ::= DROP VIEW [IF EXISTS] view-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"The specified view-name is the name of the view to drop. It is removed from the\ndatabase, but no data in the underlying tables is modified."}),"\n",(0,a.jsx)(n.h4,{id:"create-trigger",children:"CREATE TRIGGER"}),"\n",(0,a.jsx)(n.p,{children:"The create trigger statement is used to add triggers to the database schema. A\ntrigger is a database operation (the trigger-action) that is automatically\nperformed when a specified database event (the database-event) occurs."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement   ::=  CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] [database-name.] trigger-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"[BEFORE | AFTER] database-event\nON table-name\ntrigger-action"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement   ::=  CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] [database-name.] trigger-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"INSTEAD OF database-event\nON view-name\ntrigger-action"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"database-event  ::=  DELETE |\n"})}),"\n",(0,a.jsx)(n.p,{children:"INSERT |\nUPDATE |\nUPDATE OF column-list"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"trigger-action  ::=  [FOR EACH ROW] [WHEN expr]\n"})}),"\n",(0,a.jsx)(n.p,{children:"BEGIN\ntrigger-step ;\n[ trigger-step ; ]*\nEND"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"trigger-step    ::=  update-statement |\n"})}),"\n",(0,a.jsx)(n.p,{children:"insert-statement |\ndelete-statement |\nselect-statement"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"column-list     ::=  column-name [, column-name]*\n"})}),"\n",(0,a.jsx)(n.p,{children:"A trigger is specified to fire whenever a DELETE, INSERT, or UPDATE of a\nparticular database table occurs, or whenever an UPDATE of one or more specified\ncolumns of a table are updated. Triggers are permanent unless the TEMP or\nTEMPORARY keyword is used. In that case the trigger is removed when the\nSQLConnection instance's main database connection is closed. If no timing is\nspecified (BEFORE or AFTER) the trigger defaults to BEFORE."}),"\n",(0,a.jsx)(n.p,{children:"Only FOR EACH ROW triggers are supported, so the FOR EACH ROW text is optional.\nWith a FOR EACH ROW trigger, the trigger-step statements are executed for each\ndatabase row being inserted, updated or deleted by the statement causing the\ntrigger to fire, if the WHEN clause expression evaluates to true."}),"\n",(0,a.jsx)(n.p,{children:"If a WHEN clause is supplied, the SQL statements specified as trigger-steps are\nonly executed for rows for which the WHEN clause is true. If no WHEN clause is\nsupplied, the SQL statements are executed for all rows."}),"\n",(0,a.jsx)(n.p,{children:"Within the body of a trigger, (the trigger-action clause) the pre-change and\npost-change values of the affected table are available using the special table\nnames OLD and NEW. The structure of the OLD and NEW tables matches the structure\nof the table on which the trigger is created. The OLD table contains any rows\nthat are modified or deleted by the triggering statement, in their state before\nthe triggering statement's operations. The NEW table contains any rows that are\nmodified or created by the triggering statement, in their state after the\ntriggering statement's operations. Both the WHEN clause and the trigger-step\nstatements can access values from the row being inserted, deleted or updated\nusing references of the form NEW.column-name and OLD.column-name, where\ncolumn-name is the name of a column from the table with which the trigger is\nassociated. The availability of the OLD and NEW table references depen
1ds on the\ntype of database-event the trigger handles:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"INSERT \u2013 NEW references are valid"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"UPDATE \u2013 NEW and OLD references are valid"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"DELETE \u2013 OLD references are valid"}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"The specified timing (BEFORE, AFTER, or INSTEAD OF) determines when the\ntrigger-step statements are executed relative to the insertion, modification or\nremoval of the associated row. An ON CONFLICT clause may be specified as part of\nan UPDATE or INSERT statement in a trigger-step. However, if an ON CONFLICT\nclause is specified as part of the statement causing the trigger to fire, then\nthat conflict handling policy is used instead."}),"\n",(0,a.jsx)(n.p,{children:"In addition to table triggers, an INSTEAD OF trigger can be created on a view.\nIf one or more INSTEAD OF INSERT, INSTEAD OF DELETE, or INSTEAD OF UPDATE\ntriggers are defined on a view, it is not considered an error to execute the\nassociated type of statement (INSERT, DELETE, or UPDATE) on the view. In that\ncase, executing an INSERT, DELETE or UPDATE on the view causes the associated\ntriggers to fire. Because the trigger is an INSTEAD OF trigger, the tables\nunderlying the view are not modified by the statement that causes the trigger to\nfire. However, the triggers can be used to perform modifying operations on the\nunderlying tables."}),"\n",(0,a.jsx)(n.p,{children:"There is an important issue to keep in mind when creating a trigger on a table\nwith an INTEGER PRIMARY KEY column. If a BEFORE trigger modifies the INTEGER\nPRIMARY KEY column of a row that is to be updated by the statement that causes\nthe trigger to fire, the update doesn't occur. A workaround is to create the\ntable with a PRIMARY KEY column instead of an INTEGER PRIMARY KEY column."}),"\n",(0,a.jsx)(n.p,{children:"A trigger can be removed using the DROP TRIGGER statement. When a table or view\nis dropped, all triggers associated with that table or view are automatically\ndropped as well."}),"\n",(0,a.jsx)(n.h4,{id:"raise--function",children:"RAISE () function"}),"\n",(0,a.jsx)(n.p,{children:"A special SQL function RAISE() can be used in a trigger-step statement of a\ntrigger. This function has the following syntax:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"raise-function  ::=  RAISE ( ABORT, error-message ) |\n"})}),"\n",(0,a.jsx)(n.p,{children:"RAISE ( FAIL, error-message ) |\nRAISE ( ROLLBACK, error-message ) |\nRAISE ( IGNORE )"}),"\n",(0,a.jsx)(n.p,{children:"When one of the first three forms is called during trigger execution, the\nspecified ON CONFLICT processing action (ABORT, FAIL, or ROLLBACK) is performed\nand the current statement's execution ends. The ROLLBACK is considered a\nstatement execution failure, so the SQLStatement instance whose execute() method\nwas being carried out dispatches an error (SQLErrorEvent.ERROR) event. The\nSQLError object in the dispatched event object's error property has its details\nproperty set to the error-message specified in the RAISE() function."}),"\n",(0,a.jsx)(n.p,{children:"When RAISE(IGNORE) is called, the remainder of the current trigger, the\nstatement that caused the trigger to execute, and any subsequent triggers that\nwould have been executed are abandoned. No database changes are rolled back. If\nthe statement that caused the trigger to execute is itself part of a trigger,\nthat trigger program resumes execution at the beginning of the next step. For\nmore information about the conflict resolution algorithms, see the section ON\nCONFLICT (conflict algorithms)."}),"\n",(0,a.jsx)(n.h4,{id:"drop-trigger",children:"DROP TRIGGER"}),"\n",(0,a.jsx)(n.p,{children:"The DROP TRIGGER statement removes a trigger created by the CREATE TRIGGER\nstatement."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  DROP TRIGGER [IF EXISTS] [database-name.] trigger-name\n"})}),"\n",(0,a.jsx)(n.p,{children:"The trigger is deleted from the database. Note that triggers are automatically\ndropped when their associated table is dropped."}),"\n",(0,a.jsx)(n.h2,{id:"special-statements-and-clauses",children:"Special statements and clauses"}),"\n",(0,a.jsx)(n.p,{children:"This section describes several clauses that are extensions to SQL provided by\nthe runtime, as well as two language elements that can be used in many\nstatements, comments and expressions."}),"\n",(0,a.jsx)(n.h4,{id:"collate",children:"COLLATE"}),"\n",(0,a.jsx)(n.p,{children:"The COLLATE clause is used in SELECT, CREATE TABLE, and CREATE INDEX statements\nto specify the comparison algorithm that is used when comparing or sorting\nvalues."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement   ::=  COLLATE collation-name\ncollation-name  ::=  BINARY | NOCASE\n"})}),"\n",(0,a.jsx)(n.p,{children:"The default collation type for columns is BINARY. When BINARY collation is used\nwith values of the TEXT storage class, binary collation is performed by\ncomparing the bytes in memory that represent the value regardless of the text\nencoding."}),"\n",(0,a.jsx)(n.p,{children:"The NOCASE collation sequence is only applied for values of the TEXT storage\nclass. When used, the NOCASE collation performs a case-insensitive comparison."}),"\n",(0,a.jsx)(n.p,{children:"No collation sequence is used for storage classes of type NULL, BLOB, INTEGER,\nor REAL."}),"\n",(0,a.jsx)(n.p,{children:"To use a collation type other than BINARY with a column, a COLLATE clause must\nbe specified as part of the column definition in the CREATE TABLE statement.\nWhenever two TEXT values are compared, a collation sequence is used to determine\nthe results of the comparison according to the following rules:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"For binary comparison operators, if either operand is a column, then the\ndefault collation type of the column determines the collation sequence that is\nused for the comparison. If both operands are columns, then the collation type\nfor the left operand determines the collation sequence used. If neither\noperand is a column, then the BINARY collation sequence is used."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"The BETWEEN...AND operator is equivalent to using two expressions with the >=\nand <= operators. For example, the expression x BETWEEN y AND z is equivalent\nto x >= y AND x <= z. Consequently, the BETWEEN...AND operator follows the\npreceding rule to determine the collation sequence."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"The IN operator behaves like the =operator for the purposes of determining the\ncollation sequence to use. For example, the collation sequence used for the\nexpressionx IN (y, z) is the default collation type of x if x is a column.\nOtherwise, BINARY collation is used."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"An ORDER BY clause that is part of a SELECT statement may be explicitly\nassigned a collation sequence to be used for the sort operation. In that case\nthe explicit collation sequence is always used. Otherwise, if the expression\nsorted by an ORDER BYclause is a column, the default collation type of the\ncolumn is used to determine sort order. If the expression is not a column, the\nBINARY collation sequence is used."}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"explain",children:"EXPLAIN"}),"\n",(0,a.jsx)(n.p,{children:"The EXPLAIN command modifier is a 
1non-standard extension to SQL."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  EXPLAIN sql-statement\n"})}),"\n",(0,a.jsx)(n.p,{children:"If the EXPLAIN keyword appears before any other SQL statement, then instead of\nactually executing the command, the result reports the sequence of virtual\nmachine instructions it would have used to execute the command, had the EXPLAIN\nkeyword not been present. The EXPLAIN feature is an advanced feature and allows\ndevelopers to change SQL statement text in an attempt to optimize performance or\ndebug a statement that doesn't appear to be working properly."}),"\n",(0,a.jsx)(n.h4,{id:"on-conflict-conflict-algorithms",children:"ON CONFLICT (conflict algorithms)"}),"\n",(0,a.jsx)(n.p,{children:"The ON CONFLICT clause is not a separate SQL command. It is a non-standard\nclause that can appear in many other SQL commands."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"conflict-clause     ::=  ON CONFLICT conflict-algorithm\nconflict-clause     ::=  OR conflict-algorithm\nconflict-algorithm  ::=  ROLLBACK |\n"})}),"\n",(0,a.jsx)(n.p,{children:"ABORT |\nFAIL |\nIGNORE |\nREPLACE"}),"\n",(0,a.jsx)(n.p,{children:"The first form of the ON CONFLICT clause, using the keywords ON CONFLICT, is\nused in a CREATE TABLE statement. For an INSERT or UPDATE statement, the second\nform is used, with ON CONFLICT replaced by OR to make the syntax seem more\nnatural. For example, instead of INSERT ON CONFLICT IGNORE, the statement\nbecomes INSERT OR IGNORE. Although the keywords are different, the meaning of\nthe clause is the same in either form."}),"\n",(0,a.jsx)(n.p,{children:"The ON CONFLICT clause specifies the algorithm that is used to resolve\nconstraint conflicts. The five algorithms are ROLLBACK, ABORT, FAIL, IGNORE, and\nREPLACE. The default algorithm is ABORT. The following is an explanation of the\nfive conflict algorithms:"}),"\n",(0,a.jsxs)(n.p,{children:["ROLLBACK",(0,a.jsx)(n.br,{}),"\n","When a constraint violation occurs, an immediate ROLLBACK occurs, ending the\ncurrent transaction. The command aborts and the SQLStatement instance dispatches\nan error event. If no transaction is active (other than the implied transaction\nthat is created on every command) then this algorithm works the same as ABORT."]}),"\n",(0,a.jsxs)(n.p,{children:["ABORT",(0,a.jsx)(n.br,{}),"\n","When a constraint violation occurs, the command backs out any prior changes it\nmight have made and the SQLStatement instance dispatches an error event. No\nROLLBACK is executed, so changes from prior commands within a transaction are\npreserved. ABORT is the default behavior."]}),"\n",(0,a.jsxs)(n.p,{children:["FAIL",(0,a.jsx)(n.br,{}),"\n","When a constraint violation occurs, the command aborts and the SQLStatement\ndispatches an error event. However, any changes to the database that the\nstatement made before encountering the constraint violation are preserved and\nare not backed out. For example, if an UPDATE statement encounters a constraint\nviolation on the 100th row that it attempts to update, then the first 99 row\nchanges are preserved but changes to rows 100 and beyond don\u2019t occur."]}),"\n",(0,a.jsxs)(n.p,{children:["IGNORE",(0,a.jsx)(n.br,{}),"\n","When a constraint violation occurs, the one row that contains the constraint\nviolation is not inserted or changed. Aside from this row being ignored, the\ncommand continues executing normally. Other rows before and after the row that\ncontained the constraint violation continue to be inserted or updated normally.\nNo error is returned."]}),"\n",(0,a.jsxs)(n.p,{children:["REPLACE",(0,a.jsx)(n.br,{}),"\n","When a UNIQUE constraint violation occurs, the pre-existing rows that are\ncausing the constraint violation are removed before inserting or updating the\ncurrent row. Consequently, the insert or update always occurs, and the command\ncontinues executing normally. No error is returned. If a NOT NULL constraint\nviolation occurs, the NULL value is replaced by the default value for that\ncolumn. If the column has no default value, then the ABORT algorithm is used. If\na CHECK constraint violation occurs then the IGNORE algorithm is used. When this\nconflict resolution strategy deletes rows in order to satisfy a constraint, it\ndoes not invoke delete triggers on those rows."]}),"\n",(0,a.jsx)(n.p,{children:"The algorithm specified in the OR clause of an INSERT or UPDATE statement\noverrides any algorithm specified in a CREATE TABLE statement. If no algorithm\nis specified in the CREATE TABLE statement or the executing INSERT or UPDATE\nstatement, the ABORT algorithm is used."}),"\n",(0,a.jsx)(n.h4,{id:"reindex",children:"REINDEX"}),"\n",(0,a.jsx)(n.p,{children:"The REINDEX command is used to delete and re-create one or more indices. This\ncommand is useful when the definition of a collation sequence has changed."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"sql-statement  ::=  REINDEX collation-name\nsql-statement  ::=  REINDEX [database-name .] ( table-name | index-name )\n"})}),"\n",(0,a.jsx)(n.p,{children:"In the first form, all indices in all attached databases that use the named\ncollation sequence are recreated. In the second form, when a table-name is\nspecified, all indices associated with the table are rebuilt. If an index-name\nis given, only the specified index is deleted and recreated."}),"\n",(0,a.jsx)(n.h4,{id:"comments",children:"COMMENTS"}),"\n",(0,a.jsx)(n.p,{children:"Comments aren't SQL commands, but they can occur in SQL queries. They are\ntreated as white space by the runtime. They can begin anyw
1here white space can\nbe found, including inside expressions that span multiple lines."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"comment             ::=  single-line-comment |\n"})}),"\n",(0,a.jsx)(n.p,{children:"block-comment"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"single-line-comment ::=  -- single-line\nblock-comment       ::=  /* multiple-lines or block [*/]\n"})}),"\n",(0,a.jsx)(n.p,{children:"A single-line comment is indicated by two dashes. A single line comment only\nextends to the end of the current line."}),"\n",(0,a.jsx)(n.p,{children:"Block comments can span any number of lines, or be embedded within a single\nline. If there is no terminating delimiter, a block comment extends to the end\nof the input. This situation is not treated as an error. A new SQL statement can\nbegin on a line after a block comment ends. Block comments can be embedded\nanywhere white space can occur, including inside expressions, and in the middle\nof other SQL statements. Block comments do not nest. Single-line comments inside\na block comment are ignored."}),"\n",(0,a.jsx)(n.h4,{id:"expressions",children:"EXPRESSIONS"}),"\n",(0,a.jsx)(n.p,{children:"Expressions are subcommands within other SQL blocks. The following describes the\nvalid syntax for an expression within a SQL statement:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"expr            ::=  expr binary-op expr |\n"})}),"\n",(0,a.jsx)(n.p,{children:"expr [NOT] like-op expr [ESCAPE expr] |\nunary-op expr |\n( expr ) |\ncolumn-name |\ntable-name.column-name |\ndatabase-name.table-name.column-name |\nliteral-value |\nparameter |\nfunction-name( expr-list | * ) |\nexpr ISNULL |\nexpr NOTNULL |\nexpr [NOT] BETWEEN expr AND expr |\nexpr [NOT] IN ( value-list ) |\nexpr [NOT] IN ( select-statement ) |\nexpr [NOT] IN [database-name.] table-name |\n[EXISTS] ( select-statement ) |\nCASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END |\nCAST ( expr AS type ) |\nexpr COLLATE collation-name"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"like-op         ::=  LIKE | GLOB\nbinary-op       ::=  see Operators\nunary-op        ::=  see Operators\nparameter       ::=  :param-name | @param-name | ?\nvalue-list      ::=  literal-value [, literal-value]*\nliteral-value   ::=  literal-string | literal-number | literal-boolean | literal-blob | literal-null\nliteral-string  ::=  'string value'\nliteral-number  ::=  integer | number\nliteral-boolean  ::=  true | false\nliteral-blob  ::=  X'string of hexadecimal data'\nliteral-null  ::=  NULL\n"})}),"\n",(0,a.jsx)(n.p,{children:"An expression is any combination of values and operators that can be resolved to\na single value. Expressions can be divided into two general types, according to\nwhether they resolve to a boolean (true or false) value or whether they resolve\nto a non-boolean value."}),"\n",(0,a.jsx)(n.p,{children:"In several common situations, including in a WHERE clause, a HAVING clause, the\nON expression in a JOIN clause, and a CHECK expression, the expression must\nresolve to a boolean value. The following types of expressions meet this\ncondition:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"ISNULL"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"NOTNULL"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"IN ()"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"EXISTS ()"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"LIKE"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"GLOB"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Certain functions"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Certain operators (specifically comparison operators)"}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h4,{id:"literal-values",children:"Literal values"}),"\n",(0,a.jsx)(n.p,{children:"A literal numeric value is written as an integer number or a floating point\nnumber. Scientific notation is supported. The . (period) character is always\nused as the decimal point."}),"\n",(0,a.jsx)(n.p,{children:"A string literal is indicated by enclosing the string in single quotes '. To\ninclude a single quote within a string, put two single quotes in a row like this\nexample: ''."}),"\n",(0,a.jsx)(n.p,{children:"A boolean literal is indicated by the value true or false. Literal boolean\nvalues are used with the Boolean column data type."}),"\n",(0,a.jsx)(n.p,{children:"A BLOB literal is a string literal containing hexadecimal data and proceeded by\na single x or X character, such as X'535146974
165'."}),"\n",(0,a.jsx)(n.p,{children:"A literal value can also be the token NULL."}),"\n",(0,a.jsx)(n.h4,{id:"column-name",children:"Column name"}),"\n",(0,a.jsx)(n.p,{children:'A column name can be any of the names defined in the CREATE TABLE statement or\none of the following special identifiers: ROWID, OID, or _ROWID_. These\nspecial identifiers all describe the unique random integer key (the "row key")\nassociated with every row of every table. The special identifiers only refer to\nthe row key if the CREATE TABLE statement does not define a real column with the\nsame name. Row keys behave as read-only columns. A row key can be used anywhere\na regular column can be used, except that you cannot change the value of a row\nkey in an UPDATE or INSERT statement. The SELECT * FROM table statement does\nnot include the row key in its result set.'}),"\n",(0,a.jsx)(n.h4,{id:"select-statement",children:"SELECT statement"}),"\n",(0,a.jsx)(n.p,{children:"A SELECT statement can appear in an expression as either the right-hand operand\nof the IN operator, as a scalar quantity (a single result value), or as the\noperand of an EXISTS operator. When used as a scalar quantity or the operand of\nan IN operator, the SELECT can only have a single column in its result. A\ncompound SELECT statement (connected with keywords like UNION or EXCEPT) is\nallowed. With the EXISTS operator, the columns in the result set of the SELECT\nare ignored and the expression returns TRUE if one or more rows exist and FALSE\nif the result set is empty. If no terms in the SELECT expression refer to the\nvalue in the containing query, then the expression is evaluated once before any\nother processing and the result is reused as necessary. If the SELECT expression\ndoes contain variables from the outer query, known as a correlated subquery,\nthen the SELECT is re-evaluated every time it is needed."}),"\n",(0,a.jsx)(n.p,{children:"When a SELECT is the right operand of the IN operator, the IN operator returns\nTRUE if the result of the left operand is equal to any of the values in the\nSELECT statement's result set. The IN operator may be preceded by the NOT\nkeyword to invert the sense of the test."}),"\n",(0,a.jsx)(n.p,{children:"When a SELECT appears within an expression but is not the right operand of an IN\noperator, then the first row of the result of the SELECT becomes the value used\nin the expression. If the SELECT yields more than one result row, all rows after\nthe first are ignored. If the SELECT yields no rows, then the value of the\nSELECT is NULL."}),"\n",(0,a.jsx)(n.h4,{id:"cast-expression",children:"CAST expression"}),"\n",(0,a.jsx)(n.p,{children:"A CAST expression changes the data type of the value specified to the one given.\nThe type specified can be any non-empty type name that is valid for the type in\na column definition of a CREATE TABLE statement. See Data type support for\ndetails."}),"\n",(0,a.jsx)(n.h4,{id:"additional-expression-elements",children:"Additional expression elements"}),"\n",(0,a.jsx)(n.p,{children:"The following SQL elements can also be used in expressions:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Built-in functions: Aggregate functions, Scalar functions, and Date and time\nformatting functions"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Operators"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Parameters"}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"built-in-functions",children:"Built-in functions"}),"\n",(0,a.jsx)(n.p,{children:"The built-in functions fall into three main categories:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Aggregate functions"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Scalar functions"}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Date and time functions"}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"In addition to these functions, there is a special function RAISE() that is used\nto provide notification of an error in the execution of a trigger. This function\ncan only be used within the body of a CREATE TRIGGER statement. For information\non the RAISE() function, see CREATE TRIGGER > RAISE()."}),"\n",(0,a.jsx)(n.p,{children:"Like all keywords in SQL, function names are not case sensitive."}),"\n",(0,a.jsx)(n.h4,{id:"aggregate-functions",children:"Aggregate functions"}),"\n",(0,a.jsx)(n.p,{children:"Aggregate functions perform operations on values from multiple rows. These\nfunctions are primarily used in SELECT statements in conjunction with the GROUP\nBY clause."}),"\n",(0,a.jsx)("table",{children:(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"AVG(X)"})}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"Returns the average value of all non-NULL X within a group.\nString and BLOB values that do not look like numbers are interpreted as\n0. The result of AVG() is always a floating point value even if all\ninputs are integers."})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"COUNT(X) COUNT(*)"})}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"The first form returns a count of the number of times that X is\nnot NULL in a group. The second form (with the * argument) returns the\ntotal number of rows in the group."})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"MAX(X)"})}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"Returns the maximum value of all values in the group. The usual\nsort order is used to determine the maximum."})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"MIN(X)"})}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"Returns the minimum non-NULL value of all values in the group.\nThe usual sort order is used to determine the minimum. If all values in\nthe group are NULL, NULL is returned."})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsxs)("td",{children:[(0,a.jsx)("p",{children:"SUM(X)"}),"\n",(0,a.jsx)("p",{children:"TOTAL(X)"})]}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"Returns the numeric sum of all non-NULL values in the group. If\nall of the values are NULL then SUM() returns NULL, and TOTAL() returns\n0.0. The result of TOTAL() is always a floating point value. The result\nof SUM() is an integer value if all non-NULL inputs are integers. If any\ninput to SUM() is not an integer and not NULL then SUM() returns a\nfloating point value. This value might be an approximation to the true\nsum."})})]})]})}),"\n",(0,a.jsx)(n.p,{children:"In any of the preceding aggregate functions that take a single argument, that\nargument can be preceded by the keyword DISTINCT. In that case, duplicate\nelements are filtered before being passed into the aggregate function. For\nexample, the function call COUNT(DISTINCT x) returns the number of distinct\nvalues of column X instead of the total number of non-NULL values in column x."}),"\n",(0,a.jsx)(n.h4,{id:"scalar-functions",children:"Scalar functions"}),"\n",(0,a.jsx)(n.p,{children:"Scalar functions operate on values one row at a time."}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{}),(0,a.jsx)(n.th,{})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"ABS(X)"}),(0,a.jsx)(n.td,{children:"Returns the absolute value of argument X."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"COALESCE(X, Y, ...)"}),(0,a.jsx)(n.td,{children:"Returns a copy of the first non-NULL argument. If all arguments are NULL then NULL is returned. There must be at least two arguments."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"GLOB(X, Y)"}),(0,a.jsx)(n.td,{children:"This function is used to implement the X GLOB Y syntax."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"IFNULL(X, Y)"}),(0,a.jsx)(n.td,{children:"Returns a copy of the first non-NULL argument. If both arguments are NULL then NULL is returned. This function behaves the same as COALESCE()."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"HEX(X)"}),(0,a.jsx)(n.td,{children:"The argument is interpreted as a value of the BLOB storage type. The result is a hexadecimal rendering of the content of that value."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"LAST_INSERT_ROWID()"}),(0,a.jsxs)(n.td,{children:["Returns the row identifier (generated primary key) of the last row inserted to the database through the current SQLConnection. This value is the same as the value returned by the ",(0,a.jsx)(n.a,{href:"https://airsdk.dev/reference/actionscript/3.0/flash/data/S
1QLConnection.html#lastInsertRowID",children:"SQLConnection.lastInsertRowID"})," property."]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"LENGTH(X)"}),(0,a.jsx)(n.td,{children:"Returns the string length of X in characters."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"LIKE(X, Y [, Z])"}),(0,a.jsx)(n.td,{children:"This function is used to implement the X LIKE Y [ESCAPE Z] syntax of SQL. If the optional ESCAPE clause is present, then the function is invoked with three arguments. Otherwise, it is invoked with two arguments only."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"LOWER(X)"}),(0,a.jsx)(n.td,{children:"Returns a copy of string X with all characters converted to lower case."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"LTRIM(X) LTRIM(X, Y)"}),(0,a.jsx)(n.td,{children:"Returns a string formed by removing spaces from the left side of X. If a Y argument is specified, the function removes any of the characters in Y from the left side of X."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"MAX(X, Y, ...)"}),(0,a.jsx)(n.td,{children:"Returns the argument with the maximum value. Arguments may be strings in addition to numbers. The maximum value is determined by the defined sort order. Note that MAX() is a simple function when it has 2 or more arguments but is an aggregate function when it has a single argument."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"MIN(X, Y, ...)"}),(0,a.jsx)(n.td,{children:"Returns the argument with the minimum value. Arguments may be strings in addition to numbers. The minimum value is determined by the defined sort order. Note that MIN() is a simple function when it has 2 or more arguments but is an aggregate function when it has a single argument."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NULLIF(X, Y)"}),(0,a.jsx)(n.td,{children:"Returns the first argument if the arguments are different, otherwise returns NULL."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"QUOTE(X)"}),(0,a.jsx)(n.td,{children:"This routine returns a string which is the value of its argument suitable for inclusion into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. BLOB storage classes are encoded as hexadecimal literals. The function is useful when writing triggers to implement undo/redo functionality."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"RANDOM(*)"}),(0,a.jsx)(n.td,{children:"Returns a pseudo-random integer between -9223372036854775808 and 9223372036854775807. This random value is not crypto-strong."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"RANDOMBLOB(N)"}),(0,a.jsx)(n.td,{children:"Returns an N-byte BLOB containing pseudo-random bytes. N should be a positive integer. This random value is not crypto-strong. If the value of N is negative a single byte is returned."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"ROUND(X) ROUND(X, Y)"}),(0,a.jsx)(n.td,{children:"Rounds off the number X to Y digits to the right of the decimal point. If the Y argument is omitted, 0 is used."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"RTRIM(X) RTRIM(X, Y)"}),(0,a.jsx)(n.td,{children:"Returns a string formed by removing spaces from the right side of X. If a Y argument is specified, the function removes any of the characters in Y from the right side of X."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"SUBSTR(X, Y, Z)"}),(0,a.jsx)(n.td,{children:"Returns a substring of input string X that begins with the Y-th character and which is Z characters long. The left-most character of X is index position 1. If Y is negative the first character of the substring is found by counting from the right rather than the left."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"TRIM(X) TRIM(X, Y)"}),(0,a.jsx)(n.td,{children:"Returns a string formed by removing spaces from the right side of X. If a Y argument is specified, the function removes any of the characters in Y from the right side of X."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"TYPEOF(X)"}),(0,a.jsx)(n.td,{children:"Returns the type of the expression X. The possible return values are 'null', 'integer', 'real', 'text', and 'blob'. For more information on data types see Data type support."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"UPPER(X)"}),(0,a.jsx)(n.td,{children:"Returns a copy of input string X converted to all upper-case letters."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"ZEROBLOB(N)"}),(0,a.jsx)(n.td,{children:"Returns a BLOB containing N bytes of 0x00."})]})]})]}),"\n",(0,a.jsx)(n.h4,{id:"date-and-time-formatting-functions",children:"Date and time formatting functions"}),"\n",(0,a.jsx)(n.p,{children:"The date and time formatting functions are a group of scalar functions that are\nused to create formatted date and time data. Note that these functions operate\non and return string and number values. These functions are not intended to be\nused with the DATE data type. If you use these functions on data in a column\nwhose declared data type is DATE, they do not behave as expected."}),"\n",(0,a.jsx)("table",{children:(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"DATE(T, ...)"})}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"The DATE() function returns a string containing the date in this\nformat: YYYY-MM-DD. The first parameter (T) specifies a time string of\nthe format found under Time formats. Any number of modifiers can be\nspecified after the time string. The modifiers can be found under\nModifiers."})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"TIME(T, ...)"})}),(0,a.jsx)("td",{children:(0,a.jsxs)("p",{children:["The TIME() function returns a string containing the time as\nHH:MM",":SS",". The first parameter (T) specifies a time string of the format\nfound under Time formats. Any number of modifiers can be specified after\nthe time string. The modifiers can be found under Modifiers."]})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"DATETIME(T, ...)"})}),(0,a.jsx)("td",{children:(0,a.jsxs)("p",{children:["The DATETIME() function returns a string containing the date and\ntime in YYYY-MM-DD HH:MM",":SS"," format. The first parameter (T) specifies a\ntime string of the format found under Time formats. Any number of\nmodifiers can be specified after the time string. The modifiers can be\nfound under Modifiers."]})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"JULIANDAY(T, ...)"})}),(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"The JULIANDAY() function returns a number indicating the number\nof days since noon in Greenwich on November 24, 4714 B.C. and the\nprovided date. The first parameter (T) specifies a time string of the\nformat found under Time formats. Any number of modifiers can be\nspecified after the time string. The modifiers can be found under\nModifiers."})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:(0,a.jsx)("p",{children:"STRFTIME(F, T, ...)"})}),(0,a.jsxs)("td",{children:[(0,a.jsx)("p",{children:"The STRFTIME() routine returns the date formatted according to\nthe format str
1ing specified as the first argument F. The format string\nsupports the following substitutions:"}),"\n",(0,a.jsx)("p",{children:"%d - day of month"}),"\n",(0,a.jsx)("p",{children:"%f - fractional seconds SS.SSS"}),"\n",(0,a.jsx)("p",{children:"%H - hour 00-24"}),"\n",(0,a.jsx)("p",{children:"%j - day of year 001-366"}),"\n",(0,a.jsx)("p",{children:"%J - Julian day number"}),"\n",(0,a.jsx)("p",{children:"%m -month 01-12"}),"\n",(0,a.jsx)("p",{children:"%M - minute 00-59"}),"\n",(0,a.jsx)("p",{children:"%s - seconds since 1970-01-01"}),"\n",(0,a.jsx)("p",{children:"%S - seconds 00-59"}),"\n",(0,a.jsx)("p",{children:"%w - day of week 0-6 (sunday = 0)"}),"\n",(0,a.jsx)("p",{children:"%W - week of year 00-53"}),"\n",(0,a.jsx)("p",{children:"%Y - year 0000-9999"}),"\n",(0,a.jsx)("p",{children:"%% - %"}),"\n",(0,a.jsx)("p",{children:"The second parameter (T) specifies a time string of the format found\nunder Time formats. Any number of modifiers can be specified after the\ntime string. The modifiers can be found under Modifiers."})]})]})]})}),"\n",(0,a.jsx)(n.h4,{id:"time-formats",children:"Time formats"}),"\n",(0,a.jsx)(n.p,{children:"A time string can be in any of the following formats:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{}),(0,a.jsx)(n.th,{})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"YYYY-MM-DD"}),(0,a.jsx)(n.td,{children:"2007-06-15"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["YYYY-MM-DD HH",":MM"]}),(0,a.jsx)(n.td,{children:"2007-06-15 07:30"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["YYYY-MM-DD HH:MM",":SS"]}),(0,a.jsx)(n.td,{children:"2007-06-15 07:30:59"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["YYYY-MM-DD HH:MM",":SS",".SSS"]}),(0,a.jsx)(n.td,{children:"2007-06-15 07:30:59.152"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["YYYY-MM-DDTHH",":MM"]}),(0,a.jsx)(n.td,{children:"2007-06-15T07:30"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["YYYY-MM-DDTHH:MM",":SS"]}),(0,a.jsx)(n.td,{children:"2007-06-15T07:30:59"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["YYYY-MM-DDTHH:MM",":SS",".SSS"]}),(0,a.jsx)(n.td,{children:"2007-06-15T07:30:59.152"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["HH",":MM"]}),(0,a.jsx)(n.td,{children:"07:30 (date is 2000-01-01)"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["HH:MM",":SS"]}),(0,a.jsx)(n.td,{children:"07:30:59 (date is 2000-01-01)"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsxs)(n.td,{children:["HH:MM",":SS",".SSS"]}),(0,a.jsx)(n.td,{children:"07:30:59:152 (date is 2000-01-01)"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"now"}),(0,a.jsx)(n.td,{children:"Current date and time in Universal Coordinated Time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"DDDD.DDDD"}),(0,a.jsx)(n.td,{children:"Julian day number as a floating-point number."})]})]})]}),"\n",(0,a.jsx)(n.p,{children:'The character T in these formats is a literal character "T" separating the date\nand the time. Formats that only include a time assume the date 2001-01-01.'}),"\n",(0,a.jsx)(n.h4,{id:"modifiers",children:"Modifiers"}),"\n",(0,a.jsx)(n.p,{children:"The time string can be followed by zero or more modifiers that alter the date or\nalter the interpretation of the date. The available modifiers are as follows:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{}),(0,a.jsx)(n.th,{})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NNN days"}),(0,a.jsx)(n.td,{children:"Number of days to add to the time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NNN hours"}),(0,a.jsx)(n.td,{children:"Number of hours to add to the time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NNN minutes"}),(0,a.jsx)(n.td,{children:"Number of minutes to add to the time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NNN.NNNN seconds"}),(0,a.jsx)(n.td,{children:"Number of seconds and milliseconds to add to the time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NNN months"}),(0,a.jsx)(n.td,{children:"Number of months to add to the time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"NNN years"}),(0,a.jsx)(n.td,{children:"Number of years to add to the time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"start of month"}),(0,a.jsx)(n.td,{children:"Shift time backwards to the start of the month."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"start of year"}),(0,a.jsx)(n.td,{children:"Shift time backwards to the start of the year."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"start of day"}),(0,a.jsx)(n.td,{children:"Shift time backwards to the start of the day."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"weekday N"}),(0,a.jsx)(n.td,{children:"Forwards the time to the specified weekday. (0 = Sunday, 1 = Monday, and so forth)."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"localtime"}),(0,a.jsx)(n.td,{children:"Converts the date to local time."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"utc"}),(0,a.jsx)(n.td,{children:"Converts the date to Universal Coordinated Time."})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"operators",children:"Operators"}),"\n",(0,a.jsx)(n.p,{children:"SQL supports a large selection of operators, including common operators that\nexist in most programming languages, as well as several operators that are\nunique to SQL."}),"\n",(0,a.jsx)(n.h4,{id:"common-operators",children:"Common operators"}),"\n",(0,a.jsx)(n.p,{children:"The following binary operators are allowed in a SQL block and are listed in\norder from highest to lowest precedence:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"/    %"}),"\n"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"<< >> &     |\n< >=   > >=\n=    ==   !=   <> IN\nAND\nOR\n"})}),"\n",(0,a.jsx)(n.p,{children:"Supported unary prefix operators are:"}),"\n",(0,a.jsx)(n.p,{children:"!    ~    NOT"}),"\n",(0,a.jsx)(n.p,{children:"The COLLATE operator can be thought of as a unary postfix operator. The COLLATE\noperator has the highest precedence. It always binds more tightly than any\nprefix unary operator or any binary operator."}),"\n",(0,a.jsx)(n.p,{children:"Note that there are two variations of the equals and not equals operators.\nEquals can be either = or ==. The not-equals operator can be either != or <>."}),"\n",(0,a.jsx)(n.p,{children:"The || operator is the string concatenation operator\u2014it joins together the two\nstrings of its operands."}),"\n",(0,a.jsx)(n.p,{children:"The operator % outputs the remainder of its left operand modulo its right\noperand."}),"\n",(0,a.jsx)(n.p,{children:"The result of any binary operator is a numeric value, except for the ||\nconcatenation operator which gives a string result."}),"\n",(0,a.jsx)(n.h4,{id:"sql-operators",children:"SQL operators"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"LIKE"})}),"\n",(0,a.jsx)(n.p,{children:"The LIKE operator does a pattern matching comparison."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"expr     ::=  (column-name | expr) LIKE pattern\npattern  ::=  '[ string | % | _ ]'\
1n"})}),"\n",(0,a.jsx)(n.p,{children:"The operand to the right of the LIKE operator contains the pattern, and the\nleft-hand operand contains the string to match against the pattern. A percent\nsymbol (%) in the pattern is a wildcard character\u2014it matches any sequence of\nzero or more characters in the string. An underscore (_) in the pattern matches\nany single character in the string. Any other character matches itself or its\nlower/upper case equivalent, that is, matches are performed in a\ncase-insensitive manner. (Note: the database engine only understands upper/lower\ncase for 7-bit Latin characters. Consequently, the LIKE operator is case\nsensitive for 8-bit iso8859 characters or UTF-8 characters. For example, the\nexpression 'a' LIKE 'A' is TRUE but '\xe6' LIKE '\xc6' is FALSE). Case sensitivity for\nLatin characters can be changed using the SQLConnection.caseSensitiveLike\nproperty."}),"\n",(0,a.jsx)(n.p,{children:"If the optional ESCAPE clause is present, then the expression following the\nESCAPE keyword must evaluate to a string consisting of a single character. This\ncharacter may be used in the LIKE pattern to match literal percent or underscore\ncharacters. The escape character followed by a percent symbol, underscore or\nitself matches a literal percent symbol, underscore or escape character in the\nstring, respectively."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"GLOB"})}),"\n",(0,a.jsx)(n.p,{children:"The GLOB operator is similar to LIKE but uses the Unix file globbing syntax for\nits wildcards. Unlike LIKE, GLOB is case sensitive."}),"\n",(0,a.jsx)(n.p,{children:"IN"}),"\n",(0,a.jsx)(n.p,{children:"The IN operator calculates whether its left operand is equal to one of the\nvalues in its right operand (a set of values in parentheses)."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"in-expr         ::=  expr [NOT] IN ( value-list ) |\n"})}),"\n",(0,a.jsx)(n.p,{children:"expr [NOT] IN ( select-statement ) |\nexpr [NOT] IN [database-name.] table-name"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"value-list      ::=  literal-value [, literal-value]*\n"})}),"\n",(0,a.jsx)(n.p,{children:"The right operand can be a set of comma-separated literal values, or it can be\nthe result of a SELECT statement. See SELECT statements in expressions for an\nexplanation and limitations on using a SELECT statement as the right-hand\noperand of the IN operator."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"BETWEEN...AND"})}),"\n",(0,a.jsx)(n.p,{children:"The BETWEEN...AND operator is equivalent to using two expressions with the >=\nand <= operators. For example, the expression x BETWEEN y AND z is equivalent\nto x >= y AND x <= z."}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"NOT"})}),"\n",(0,a.jsx)(n.p,{children:"The NOT operator is a negation operator. The GLOB, LIKE, and IN operators may be\npreceded by the NOT keyword to invert the sense of the test (in other words, to\ncheck that a value does not match the indicated pattern)."}),"\n",(0,a.jsx)(n.h2,{id:"parameters",children:"Parameters"}),"\n",(0,a.jsx)(n.p,{children:"A parameter specifies a placeholder in the expression for a literal value that\nis filled in at runtime by assigning a value to the SQLStatement.parameters\nassociative array. Parameters can take three forms:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{}),(0,a.jsx)(n.th,{})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"?"}),(0,a.jsx)(n.td,{children:"A question mark indicates an indexed parameter. Parameters are assigned numerical (zero-based) index values according to their order in the statement."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:":AAAA"}),(0,a.jsx)(n.td,{children:"A colon followed by an identifier name holds a spot for a named parameter with the name AAAA. Named parameters are also numbered according to their order in the SQL statement. To avoid confusion, it is best to avoid mixing named and numbered parameters."})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:"@AAAA"}),(0,a.jsx)(n.td,{children:'An "at sign" is equivalent to a colon.'})]})]})]}),"\n",(0,a.jsx)(n.h2,{id:"unsupported-sql-features",children:"Unsupported SQL features"}),"\n",(0,a.jsx)(n.p,{children:"The following is a list of the standard SQL elements that are not supported in\nAdobe AIR:"}),"\n",(0,a.jsxs)(n.p,{children:["FOREIGN KEY constraints",(0,a.jsx)(n.br,{}),"\n","FOREIGN KEY constraints are parsed but are not enforced."]}),"\n",(0,a.jsxs)(n.p,{children:["Triggers",(0,a.jsx)(n.br,{}
1),"\n","FOR EACH STATEMENT triggers are not supported (all triggers must be FOR EACH\nROW). INSTEAD OF triggers are not supported on tables (INSTEAD OF triggers are\nonly allowed on views). Recursive triggers\u2014triggers that trigger themselves\u2014are\nnot supported."]}),"\n",(0,a.jsxs)(n.p,{children:["ALTER TABLE",(0,a.jsx)(n.br,{}),"\n","Only the RENAME TABLE and ADD COLUMN variants of the ALTER TABLE command are\nsupported. Other kinds of ALTER TABLE operations such as DROP COLUMN, ALTER\nCOLUMN, ADD CONSTRAINT, and so forth are ignored."]}),"\n",(0,a.jsxs)(n.p,{children:["Nested transactions",(0,a.jsx)(n.br,{}),"\n","Only a single active transaction is allowed."]}),"\n",(0,a.jsxs)(n.p,{children:["RIGHT and FULL OUTER JOIN",(0,a.jsx)(n.br,{}),"\n","RIGHT OUTER JOIN or FULL OUTER JOIN are not supported."]}),"\n",(0,a.jsxs)(n.p,{children:["Updateable VIEW",(0,a.jsx)(n.br,{}),"\n","A view is read only. You may not execute a DELETE, INSERT, or UPDATE statement\non a view. An INSTEAD OF trigger that fires on an attempt to DELETE, INSERT, or\nUPDATE a view is supported and can be used to update supporting tables in the\nbody of the trigger."]}),"\n",(0,a.jsxs)(n.p,{children:["GRANT and REVOKE",(0,a.jsx)(n.br,{}),"\n","A database is an ordinary disk file; the only access permissions that can be\napplied are the normal file access permissions of the underlying operating\nsystem. The GRANT and REVOKE commands commonly found on client/server RDBMSes\nare not implemented."]}),"\n",(0,a.jsx)(n.p,{children:"The following SQL elements and SQLite features are supported in some SQLite\nimplementations, but are not supported in Adobe AIR. Most of this functionality\nis available through methods of the SQLConnection class:"}),"\n",(0,a.jsxs)(n.p,{children:["Transaction-related SQL elements (BEGIN, END, COMMIT, ROLLBACK)",(0,a.jsx)(n.br,{}),"\n","This functionality is available through the transaction-related methods of the\nSQLConnection class: SQLConnection.begin(), SQLConnection.commit(), and\nSQLConnection.rollback()."]}),"\n",(0,a.jsxs)(n.p,{children:["ANALYZE",(0,a.jsx)(n.br,{}),"\n","This functionality is available through the SQLConnection.analyze() method."]}),"\n",(0,a.jsxs)(n.p,{children:["ATTACH",(0,a.jsx)(n.br,{}),"\n","This functionality is available through the SQLConnection.attach() method."]}),"\n",(0,a.jsxs)(n.p,{children:["COPY",(0,a.jsx)(n.br,{}),"\n","This statement is not supported."]}),"\n",(0,a.jsxs)(n.p,{children:["CREATE VIRTUAL TABLE",(0,a.jsx)(n.br,{}),"\n","This statement is not supported."]}),"\n",(0,a.jsxs)(n.p,{children:["DETACH",(0,a.jsx)(n.br,{}),"\n","This functionality is available through the SQLConnection.detach() method."]}),"\n",(0,a.jsxs)(n.p,{children:["PRAGMA",(0,a.jsx)(n.br,{}),"\n","This statement is not supported."]}),"\n",(0,a.jsxs)(n.p,{children:["VACUUM",(0,a.jsx)(n.br,{}),"\n","This functionality is available through the SQLConnection.compact() method."]}),"\n",(0,a.jsxs)(n.p,{children:["System table access is not available",(0,a.jsx)(n.br,{}),"\n",'The system tables including sqlite_master and other tables with the "sqlite_"\nprefix are not available in SQL statements. The runtime includes a schema API\nthat provides an object-oriented way to access schema data. For more information\nsee the SQLConnection.loadSchema() method.']}),"\n",(0,a.jsxs)(n.p,{children:["Regular-expression functions (MATCH() and REGEX())",(0,a.jsx)(n.br,{}),"\n","These functions are not available in SQL statements."]}),"\n",(0,a.jsx)(n.p,{children:"The following functionality differs between many SQLite implementations and\nAdobe AIR:"}),"\n",(0,a.jsxs)(n.p,{children:["Indexed statement parameters",(0,a.jsx)(n.br,{}),"\n","In many implementations indexed statement parameters are one-based. However, in\nAdobe AIR indexed statement parameters are zero-based (that is, the first\nparameter is given the index 0, the second parameter is given the index 1, and\nso forth."]}),"\n",(0,a.jsxs)(n.p,{children:["INTEGER PRIMARY KEY column definitions",(0,a.jsx)(n.br,{}),"\n","In many implementations, only columns that are defined exactly as INTEGER\nPRIMARY KEY are used as the actual primary key column for a table. In those\nimplementations, using another data type that is usually a synonym for INTEGER\n(such as int) does not cause the column to be used as the internal primary key.\nHowever, in Adobe AIR, the int data type (and other INTEGER synonyms) are\nconsidered exactly equivalent to INTEGER. Consequently, a column defined as int\nPRI
1MARY KEY is used as the internal primary key for a table. For more\ninformation, see the sections CREATE TABLE and Column affinity."]}),"\n",(0,a.jsx)(n.h2,{id:"additional-sql-features",children:"Additional SQL features"}),"\n",(0,a.jsx)(n.p,{children:"The following column affinity types are not supported by default in SQLite, but\nare supported in Adobe AIR (Note that, like all keywords in SQL, these data type\nnames are not case-sensitive):"}),"\n",(0,a.jsxs)(n.p,{children:["Boolean",(0,a.jsx)(n.br,{}),"\n","corresponding to the Boolean class."]}),"\n",(0,a.jsxs)(n.p,{children:["Date",(0,a.jsx)(n.br,{}),"\n","corresponding to the Date class."]}),"\n",(0,a.jsxs)(n.p,{children:["int",(0,a.jsx)(n.br,{}),"\n","corresponding to the int class (equivalent to the INTEGER column affinity)."]}),"\n",(0,a.jsxs)(n.p,{children:["Number",(0,a.jsx)(n.br,{}),"\n","corresponding to the Number class (equivalent to the REAL column affinity)."]}),"\n",(0,a.jsxs)(n.p,{children:["Object",(0,a.jsx)(n.br,{}),"\n","corresponding to the Object class or any subclass that can be serialized and\ndeserialized using AMF3. (This includes most classes including custom classes,\nbut excludes some classes including display objects and objects that include\ndisplay objects as properties.)"]}),"\n",(0,a.jsxs)(n.p,{children:["String",(0,a.jsx)(n.br,{}),"\n","corresponding to the String class (equivalent to the TEXT column affinity)."]}),"\n",(0,a.jsxs)(n.p,{children:["XML",(0,a.jsx)(n.br,{}),"\n","corresponding to the ActionScript (E4X) XML class."]}),"\n",(0,a.jsxs)(n.p,{children:["XMLList",(0,a.jsx)(n.br,{}),"\n","corresponding to the ActionScript (E4X) XMLList class."]}),"\n",(0,a.jsx)(n.p,{children:"The following literal values are not supported by default in SQLite, but are\nsupported in Adobe AIR:"}),"\n",(0,a.jsxs)(n.p,{children:["true",(0,a.jsx)(n.br,{}),"\n","used to represent the literal boolean value true, for working with BOOLEAN\ncolumns."]}),"\n",(0,a.jsxs)(n.p,{children:["false",(0,a.jsx)(n.br,{}),"\n","used to represent the literal boolean value false, for working with BOOLEAN\ncolumns."]})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},28453(e,n,t){t.d(n,{R:()=>r,x:()=>o});var s=t(96540);const a={},i=s.createContext(a);function r(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.