1SQL::Translator::ParserU:s:eSrQLCiotnet(r3i)buted Perl DSoQcLu:m:eTnrtaantsiloantor::Parser::SQLite(3)
2
3
4

NAME

6       SQL::Translator::Parser::SQLite - parser for SQLite
7

SYNOPSIS

9         use SQL::Translator;
10         use SQL::Translator::Parser::SQLite;
11
12         my $translator = SQL::Translator->new;
13         $translator->parser("SQL::Translator::Parser::SQLite");
14

DESCRIPTION

16       This is a grammar for parsing CREATE statements for SQLite as described
17       here:
18
19           http://www.sqlite.org/lang.html
20
21       CREATE INDEX
22
23       sql-statement ::=
24           CREATE [TEMP | TEMPORARY] [UNIQUE] INDEX index-name
25            ON [database-name .] table-name ( column-name [, column-name]* )
26            [ ON CONFLICT conflict-algorithm ]
27
28       column-name ::=
29           name [ ASC | DESC ]
30
31       CREATE TABLE
32
33       sql-command ::=
34           CREATE [TEMP | TEMPORARY] TABLE table-name (
35               column-def [, column-def]*
36               [, constraint]*
37            )
38
39       sql-command ::=
40           CREATE [TEMP | TEMPORARY] TABLE table-name AS select-statement
41
42       column-def ::=
43           name [type] [[CONSTRAINT name] column-constraint]*
44
45       type ::=
46           typename |
47            typename ( number ) |
48            typename ( number , number )
49
50       column-constraint ::=
51           NOT NULL [ conflict-clause ] |
52           PRIMARY KEY [sort-order] [ conflict-clause ] |
53           UNIQUE [ conflict-clause ] |
54           CHECK ( expr ) [ conflict-clause ] |
55           DEFAULT value
56
57       constraint ::=
58           PRIMARY KEY ( name [, name]* ) [ conflict-clause ]|
59           UNIQUE ( name [, name]* ) [ conflict-clause ] |
60           CHECK ( expr ) [ conflict-clause ]
61
62       conflict-clause ::=
63           ON CONFLICT conflict-algorithm
64
65       CREATE TRIGGER
66
67       sql-statement ::=
68           CREATE [TEMP | TEMPORARY] TRIGGER trigger-name [ BEFORE | AFTER ]
69           database-event ON [database-name .] table-name
70           trigger-action
71
72       sql-statement ::=
73           CREATE [TEMP | TEMPORARY] TRIGGER trigger-name INSTEAD OF
74           database-event ON [database-name .] view-name
75           trigger-action
76
77       database-event ::=
78           DELETE |
79           INSERT |
80           UPDATE |
81           UPDATE OF column-list
82
83       trigger-action ::=
84           [ FOR EACH ROW | FOR EACH STATEMENT ] [ WHEN expression ]
85               BEGIN
86                   trigger-step ; [ trigger-step ; ]*
87               END
88
89       trigger-step ::=
90           update-statement | insert-statement |
91           delete-statement | select-statement
92
93       CREATE VIEW
94
95       sql-command ::=
96           CREATE [TEMP | TEMPORARY] VIEW view-name AS select-statement
97
98       ON CONFLICT clause
99
100           conflict-clause ::=
101           ON CONFLICT conflict-algorithm
102
103           conflict-algorithm ::=
104           ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
105
106       expression
107
108       expr ::=
109           expr binary-op expr |
110           expr like-op expr |
111           unary-op expr |
112           ( expr ) |
113           column-name |
114           table-name . column-name |
115           database-name . table-name . column-name |
116           literal-value |
117           function-name ( expr-list | * ) |
118           expr (+) |
119           expr ISNULL |
120           expr NOTNULL |
121           expr [NOT] BETWEEN expr AND expr |
122           expr [NOT] IN ( value-list ) |
123           expr [NOT] IN ( select-statement ) |
124           ( select-statement ) |
125           CASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END
126
127       like-op::=
128           LIKE | GLOB | NOT LIKE | NOT GLOB
129

AUTHOR

131       Ken Youens-Clark <kclark@cpan.org>.
132

SEE ALSO

134       perl(1), Parse::RecDescent, SQL::Translator::Schema.
135
136
137
138perl v5.36.0                      2023-02-27SQL::Translator::Parser::SQLite(3)
Impressum