2009-02-20 21:40:17 -05:00
|
|
|
! Copyright (C) 2009 Doug Coleman.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2009-02-20 23:59:01 -05:00
|
|
|
USING: accessors combinators db kernel sequences peg.ebnf
|
|
|
|
strings db.errors ;
|
2016-03-22 15:44:23 -04:00
|
|
|
IN: db.sqlite.errors
|
2009-02-20 21:40:17 -05:00
|
|
|
|
2009-04-06 23:00:08 -04:00
|
|
|
TUPLE: unparsed-sqlite-error error ;
|
|
|
|
C: <unparsed-sqlite-error> unparsed-sqlite-error
|
2009-02-20 21:40:17 -05:00
|
|
|
|
|
|
|
EBNF: parse-sqlite-sql-error
|
|
|
|
|
2016-02-20 12:07:42 -05:00
|
|
|
AlreadyExists = " already exists"
|
2009-02-20 21:40:17 -05:00
|
|
|
|
|
|
|
SqliteError =
|
2016-02-20 12:07:42 -05:00
|
|
|
"table " (!(AlreadyExists).)+:table AlreadyExists
|
|
|
|
=> [[ table >string <sql-table-exists> ]]
|
2016-02-20 13:00:50 -05:00
|
|
|
| "index " (!(AlreadyExists).)+:name AlreadyExists
|
|
|
|
=> [[ name >string <sql-index-exists> ]]
|
2009-02-20 21:40:17 -05:00
|
|
|
| "no such table: " .+:table
|
|
|
|
=> [[ table >string <sql-table-missing> ]]
|
2009-04-06 23:00:08 -04:00
|
|
|
| .*:error
|
|
|
|
=> [[ error >string <unparsed-sqlite-error> ]]
|
2009-02-20 21:40:17 -05:00
|
|
|
;EBNF
|