diff --git a/src/better_sqlite3.cpp b/src/better_sqlite3.cpp index 92485bb2..8fe2c682 100644 --- a/src/better_sqlite3.cpp +++ b/src/better_sqlite3.cpp @@ -209,6 +209,10 @@ CS::CS (v8::Isolate * isolate) SetCode(isolate, SQLITE_WARNING, "SQLITE_WARNING"); SetCode(isolate, SQLITE_ROW, "SQLITE_ROW"); SetCode(isolate, SQLITE_DONE, "SQLITE_DONE"); + + SetCode(isolate, SQLITE_ERROR_MISSING_COLLSEQ, "SQLITE_ERROR_MISSING_COLLSEQ"); + SetCode(isolate, SQLITE_ERROR_RETRY, "SQLITE_ERROR_RETRY"); + SetCode(isolate, SQLITE_ERROR_SNAPSHOT, "SQLITE_ERROR_SNAPSHOT"); SetCode(isolate, SQLITE_IOERR_READ, "SQLITE_IOERR_READ"); SetCode(isolate, SQLITE_IOERR_SHORT_READ, "SQLITE_IOERR_SHORT_READ"); SetCode(isolate, SQLITE_IOERR_WRITE, "SQLITE_IOERR_WRITE"); @@ -237,18 +241,31 @@ CS::CS (v8::Isolate * isolate) SetCode(isolate, SQLITE_IOERR_CONVPATH, "SQLITE_IOERR_CONVPATH"); SetCode(isolate, SQLITE_IOERR_VNODE, "SQLITE_IOERR_VNODE"); SetCode(isolate, SQLITE_IOERR_AUTH, "SQLITE_IOERR_AUTH"); + SetCode(isolate, SQLITE_IOERR_BEGIN_ATOMIC, "SQLITE_IOERR_BEGIN_ATOMIC"); + SetCode(isolate, SQLITE_IOERR_COMMIT_ATOMIC, "SQLITE_IOERR_COMMIT_ATOMIC"); + SetCode(isolate, SQLITE_IOERR_ROLLBACK_ATOMIC, "SQLITE_IOERR_ROLLBACK_ATOMIC"); + SetCode(isolate, SQLITE_IOERR_DATA, "SQLITE_IOERR_DATA"); + SetCode(isolate, SQLITE_IOERR_CORRUPTFS, "SQLITE_IOERR_CORRUPTFS"); + SetCode(isolate, SQLITE_IOERR_IN_PAGE, "SQLITE_IOERR_IN_PAGE"); SetCode(isolate, SQLITE_LOCKED_SHAREDCACHE, "SQLITE_LOCKED_SHAREDCACHE"); + SetCode(isolate, SQLITE_LOCKED_VTAB, "SQLITE_LOCKED_VTAB"); SetCode(isolate, SQLITE_BUSY_RECOVERY, "SQLITE_BUSY_RECOVERY"); SetCode(isolate, SQLITE_BUSY_SNAPSHOT, "SQLITE_BUSY_SNAPSHOT"); SetCode(isolate, SQLITE_CANTOPEN_NOTEMPDIR, "SQLITE_CANTOPEN_NOTEMPDIR"); SetCode(isolate, SQLITE_CANTOPEN_ISDIR, "SQLITE_CANTOPEN_ISDIR"); SetCode(isolate, SQLITE_CANTOPEN_FULLPATH, "SQLITE_CANTOPEN_FULLPATH"); SetCode(isolate, SQLITE_CANTOPEN_CONVPATH, "SQLITE_CANTOPEN_CONVPATH"); + SetCode(isolate, SQLITE_CANTOPEN_DIRTYWAL, "SQLITE_CANTOPEN_DIRTYWAL"); + SetCode(isolate, SQLITE_CANTOPEN_SYMLINK, "SQLITE_CANTOPEN_SYMLINK"); SetCode(isolate, SQLITE_CORRUPT_VTAB, "SQLITE_CORRUPT_VTAB"); + SetCode(isolate, SQLITE_CORRUPT_SEQUENCE, "SQLITE_CORRUPT_SEQUENCE"); + SetCode(isolate, SQLITE_CORRUPT_INDEX, "SQLITE_CORRUPT_INDEX"); SetCode(isolate, SQLITE_READONLY_RECOVERY, "SQLITE_READONLY_RECOVERY"); SetCode(isolate, SQLITE_READONLY_CANTLOCK, "SQLITE_READONLY_CANTLOCK"); SetCode(isolate, SQLITE_READONLY_ROLLBACK, "SQLITE_READONLY_ROLLBACK"); SetCode(isolate, SQLITE_READONLY_DBMOVED, "SQLITE_READONLY_DBMOVED"); + SetCode(isolate, SQLITE_READONLY_CANTINIT, "SQLITE_READONLY_CANTINIT"); + SetCode(isolate, SQLITE_READONLY_DIRECTORY, "SQLITE_READONLY_DIRECTORY"); SetCode(isolate, SQLITE_ABORT_ROLLBACK, "SQLITE_ABORT_ROLLBACK"); SetCode(isolate, SQLITE_CONSTRAINT_CHECK, "SQLITE_CONSTRAINT_CHECK"); SetCode(isolate, SQLITE_CONSTRAINT_COMMITHOOK, "SQLITE_CONSTRAINT_COMMITHOOK"); @@ -260,22 +277,25 @@ CS::CS (v8::Isolate * isolate) SetCode(isolate, SQLITE_CONSTRAINT_UNIQUE, "SQLITE_CONSTRAINT_UNIQUE"); SetCode(isolate, SQLITE_CONSTRAINT_VTAB, "SQLITE_CONSTRAINT_VTAB"); SetCode(isolate, SQLITE_CONSTRAINT_ROWID, "SQLITE_CONSTRAINT_ROWID"); + SetCode(isolate, SQLITE_CONSTRAINT_PINNED, "SQLITE_CONSTRAINT_PINNED"); + SetCode(isolate, SQLITE_CONSTRAINT_DATATYPE, "SQLITE_CONSTRAINT_DATATYPE"); SetCode(isolate, SQLITE_NOTICE_RECOVER_WAL, "SQLITE_NOTICE_RECOVER_WAL"); SetCode(isolate, SQLITE_NOTICE_RECOVER_ROLLBACK, "SQLITE_NOTICE_RECOVER_ROLLBACK"); + SetCode(isolate, SQLITE_NOTICE_RBU, "SQLITE_NOTICE_RBU"); SetCode(isolate, SQLITE_WARNING_AUTOINDEX, "SQLITE_WARNING_AUTOINDEX"); SetCode(isolate, SQLITE_AUTH_USER, "SQLITE_AUTH_USER"); SetCode(isolate, SQLITE_OK_LOAD_PERMANENTLY, "SQLITE_OK_LOAD_PERMANENTLY"); - SetCode(isolate, SQLITE_ERROR_MISSING_COLLSEQ, "SQLITE_ERROR_MISSING_COLLSEQ"); + SetCode(isolate, SQLITE_OK_SYMLINK, "SQLITE_OK_SYMLINK"); } -#line 141 "./src/util/constants.lzz" +#line 161 "./src/util/constants.lzz" void CS::SetString (v8::Isolate * isolate, v8::Global & constant, char const * str) -#line 141 "./src/util/constants.lzz" +#line 161 "./src/util/constants.lzz" { constant.Reset(isolate, InternalizedFromLatin1(isolate, str)); } -#line 145 "./src/util/constants.lzz" +#line 165 "./src/util/constants.lzz" void CS::SetCode (v8::Isolate * isolate, int code, char const * str) -#line 145 "./src/util/constants.lzz" +#line 165 "./src/util/constants.lzz" { codes.emplace(std::piecewise_construct, std::forward_as_tuple(code), diff --git a/src/better_sqlite3.hpp b/src/better_sqlite3.hpp index f11fe70c..27ae83b0 100644 --- a/src/better_sqlite3.hpp +++ b/src/better_sqlite3.hpp @@ -68,49 +68,49 @@ class CS v8::Local Code (v8::Isolate * isolate, int code); #line 10 "./src/util/constants.lzz" explicit CS (v8::Isolate * isolate); -#line 120 "./src/util/constants.lzz" +#line 140 "./src/util/constants.lzz" v8::Global database; -#line 121 "./src/util/constants.lzz" +#line 141 "./src/util/constants.lzz" v8::Global reader; -#line 122 "./src/util/constants.lzz" +#line 142 "./src/util/constants.lzz" v8::Global source; -#line 123 "./src/util/constants.lzz" +#line 143 "./src/util/constants.lzz" v8::Global memory; -#line 124 "./src/util/constants.lzz" +#line 144 "./src/util/constants.lzz" v8::Global readonly; -#line 125 "./src/util/constants.lzz" +#line 145 "./src/util/constants.lzz" v8::Global name; -#line 126 "./src/util/constants.lzz" +#line 146 "./src/util/constants.lzz" v8::Global next; -#line 127 "./src/util/constants.lzz" +#line 147 "./src/util/constants.lzz" v8::Global length; -#line 128 "./src/util/constants.lzz" +#line 148 "./src/util/constants.lzz" v8::Global done; -#line 129 "./src/util/constants.lzz" +#line 149 "./src/util/constants.lzz" v8::Global value; -#line 130 "./src/util/constants.lzz" +#line 150 "./src/util/constants.lzz" v8::Global changes; -#line 131 "./src/util/constants.lzz" +#line 151 "./src/util/constants.lzz" v8::Global lastInsertRowid; -#line 132 "./src/util/constants.lzz" +#line 152 "./src/util/constants.lzz" v8::Global statement; -#line 133 "./src/util/constants.lzz" +#line 153 "./src/util/constants.lzz" v8::Global column; -#line 134 "./src/util/constants.lzz" +#line 154 "./src/util/constants.lzz" v8::Global table; -#line 135 "./src/util/constants.lzz" +#line 155 "./src/util/constants.lzz" v8::Global type; -#line 136 "./src/util/constants.lzz" +#line 156 "./src/util/constants.lzz" v8::Global totalPages; -#line 137 "./src/util/constants.lzz" +#line 157 "./src/util/constants.lzz" v8::Global remainingPages; -#line 139 "./src/util/constants.lzz" +#line 159 "./src/util/constants.lzz" private: -#line 141 "./src/util/constants.lzz" +#line 161 "./src/util/constants.lzz" static void SetString (v8::Isolate * isolate, v8::Global & constant, char const * str); -#line 145 "./src/util/constants.lzz" +#line 165 "./src/util/constants.lzz" void SetCode (v8::Isolate * isolate, int code, char const * str); -#line 151 "./src/util/constants.lzz" +#line 171 "./src/util/constants.lzz" std::unordered_map > codes; }; #line 1 "./src/util/bind-map.lzz" diff --git a/src/util/constants.lzz b/src/util/constants.lzz index b5207c3a..d1b6e137 100644 --- a/src/util/constants.lzz +++ b/src/util/constants.lzz @@ -58,6 +58,10 @@ public: SetCode(isolate, SQLITE_WARNING, "SQLITE_WARNING"); SetCode(isolate, SQLITE_ROW, "SQLITE_ROW"); SetCode(isolate, SQLITE_DONE, "SQLITE_DONE"); + + SetCode(isolate, SQLITE_ERROR_MISSING_COLLSEQ, "SQLITE_ERROR_MISSING_COLLSEQ"); + SetCode(isolate, SQLITE_ERROR_RETRY, "SQLITE_ERROR_RETRY"); + SetCode(isolate, SQLITE_ERROR_SNAPSHOT, "SQLITE_ERROR_SNAPSHOT"); SetCode(isolate, SQLITE_IOERR_READ, "SQLITE_IOERR_READ"); SetCode(isolate, SQLITE_IOERR_SHORT_READ, "SQLITE_IOERR_SHORT_READ"); SetCode(isolate, SQLITE_IOERR_WRITE, "SQLITE_IOERR_WRITE"); @@ -86,18 +90,31 @@ public: SetCode(isolate, SQLITE_IOERR_CONVPATH, "SQLITE_IOERR_CONVPATH"); SetCode(isolate, SQLITE_IOERR_VNODE, "SQLITE_IOERR_VNODE"); SetCode(isolate, SQLITE_IOERR_AUTH, "SQLITE_IOERR_AUTH"); + SetCode(isolate, SQLITE_IOERR_BEGIN_ATOMIC, "SQLITE_IOERR_BEGIN_ATOMIC"); + SetCode(isolate, SQLITE_IOERR_COMMIT_ATOMIC, "SQLITE_IOERR_COMMIT_ATOMIC"); + SetCode(isolate, SQLITE_IOERR_ROLLBACK_ATOMIC, "SQLITE_IOERR_ROLLBACK_ATOMIC"); + SetCode(isolate, SQLITE_IOERR_DATA, "SQLITE_IOERR_DATA"); + SetCode(isolate, SQLITE_IOERR_CORRUPTFS, "SQLITE_IOERR_CORRUPTFS"); + SetCode(isolate, SQLITE_IOERR_IN_PAGE, "SQLITE_IOERR_IN_PAGE"); SetCode(isolate, SQLITE_LOCKED_SHAREDCACHE, "SQLITE_LOCKED_SHAREDCACHE"); + SetCode(isolate, SQLITE_LOCKED_VTAB, "SQLITE_LOCKED_VTAB"); SetCode(isolate, SQLITE_BUSY_RECOVERY, "SQLITE_BUSY_RECOVERY"); SetCode(isolate, SQLITE_BUSY_SNAPSHOT, "SQLITE_BUSY_SNAPSHOT"); SetCode(isolate, SQLITE_CANTOPEN_NOTEMPDIR, "SQLITE_CANTOPEN_NOTEMPDIR"); SetCode(isolate, SQLITE_CANTOPEN_ISDIR, "SQLITE_CANTOPEN_ISDIR"); SetCode(isolate, SQLITE_CANTOPEN_FULLPATH, "SQLITE_CANTOPEN_FULLPATH"); SetCode(isolate, SQLITE_CANTOPEN_CONVPATH, "SQLITE_CANTOPEN_CONVPATH"); + SetCode(isolate, SQLITE_CANTOPEN_DIRTYWAL, "SQLITE_CANTOPEN_DIRTYWAL"); + SetCode(isolate, SQLITE_CANTOPEN_SYMLINK, "SQLITE_CANTOPEN_SYMLINK"); SetCode(isolate, SQLITE_CORRUPT_VTAB, "SQLITE_CORRUPT_VTAB"); + SetCode(isolate, SQLITE_CORRUPT_SEQUENCE, "SQLITE_CORRUPT_SEQUENCE"); + SetCode(isolate, SQLITE_CORRUPT_INDEX, "SQLITE_CORRUPT_INDEX"); SetCode(isolate, SQLITE_READONLY_RECOVERY, "SQLITE_READONLY_RECOVERY"); SetCode(isolate, SQLITE_READONLY_CANTLOCK, "SQLITE_READONLY_CANTLOCK"); SetCode(isolate, SQLITE_READONLY_ROLLBACK, "SQLITE_READONLY_ROLLBACK"); SetCode(isolate, SQLITE_READONLY_DBMOVED, "SQLITE_READONLY_DBMOVED"); + SetCode(isolate, SQLITE_READONLY_CANTINIT, "SQLITE_READONLY_CANTINIT"); + SetCode(isolate, SQLITE_READONLY_DIRECTORY, "SQLITE_READONLY_DIRECTORY"); SetCode(isolate, SQLITE_ABORT_ROLLBACK, "SQLITE_ABORT_ROLLBACK"); SetCode(isolate, SQLITE_CONSTRAINT_CHECK, "SQLITE_CONSTRAINT_CHECK"); SetCode(isolate, SQLITE_CONSTRAINT_COMMITHOOK, "SQLITE_CONSTRAINT_COMMITHOOK"); @@ -109,12 +126,15 @@ public: SetCode(isolate, SQLITE_CONSTRAINT_UNIQUE, "SQLITE_CONSTRAINT_UNIQUE"); SetCode(isolate, SQLITE_CONSTRAINT_VTAB, "SQLITE_CONSTRAINT_VTAB"); SetCode(isolate, SQLITE_CONSTRAINT_ROWID, "SQLITE_CONSTRAINT_ROWID"); + SetCode(isolate, SQLITE_CONSTRAINT_PINNED, "SQLITE_CONSTRAINT_PINNED"); + SetCode(isolate, SQLITE_CONSTRAINT_DATATYPE, "SQLITE_CONSTRAINT_DATATYPE"); SetCode(isolate, SQLITE_NOTICE_RECOVER_WAL, "SQLITE_NOTICE_RECOVER_WAL"); SetCode(isolate, SQLITE_NOTICE_RECOVER_ROLLBACK, "SQLITE_NOTICE_RECOVER_ROLLBACK"); + SetCode(isolate, SQLITE_NOTICE_RBU, "SQLITE_NOTICE_RBU"); SetCode(isolate, SQLITE_WARNING_AUTOINDEX, "SQLITE_WARNING_AUTOINDEX"); SetCode(isolate, SQLITE_AUTH_USER, "SQLITE_AUTH_USER"); SetCode(isolate, SQLITE_OK_LOAD_PERMANENTLY, "SQLITE_OK_LOAD_PERMANENTLY"); - SetCode(isolate, SQLITE_ERROR_MISSING_COLLSEQ, "SQLITE_ERROR_MISSING_COLLSEQ"); + SetCode(isolate, SQLITE_OK_SYMLINK, "SQLITE_OK_SYMLINK"); } v8::Global database;