1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: db.errors kernel multiline peg.ebnf sequences strings ;
6 TUPLE: unparsed-sqlite-error error ;
7 C: <unparsed-sqlite-error> unparsed-sqlite-error
9 EBNF: parse-sqlite-sql-error [=[
11 AlreadyExists = " already exists"
14 "table " (!(AlreadyExists).)+:table AlreadyExists
15 => [[ table >string <sql-table-exists> ]]
16 | "index " (!(AlreadyExists).)+:name AlreadyExists
17 => [[ name >string <sql-index-exists> ]]
18 | "no such table: " .+:table
19 => [[ table >string <sql-table-missing> ]]
21 => [[ error >string <unparsed-sqlite-error> ]]