Skip to content

Commit

Permalink
Add missing SQLite Error code identifier.
Browse files Browse the repository at this point in the history
Co-authored-by: Alejandro Ramírez Morales <[email protected]>
  • Loading branch information
m4heshd and Meztlicoatl committed Dec 11, 2024
1 parent c30f4c0 commit 0a38c3b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
9 changes: 5 additions & 4 deletions src/better_sqlite3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,17 @@ CS::CS (v8::Isolate * isolate)
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");
}
#line 140 "./src/util/constants.lzz"
#line 141 "./src/util/constants.lzz"
void CS::SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str)
#line 140 "./src/util/constants.lzz"
#line 141 "./src/util/constants.lzz"
{
constant.Reset(isolate, InternalizedFromLatin1(isolate, str));
}
#line 144 "./src/util/constants.lzz"
#line 145 "./src/util/constants.lzz"
void CS::SetCode (v8::Isolate * isolate, int code, char const * str)
#line 144 "./src/util/constants.lzz"
#line 145 "./src/util/constants.lzz"
{
codes.emplace(std::piecewise_construct,
std::forward_as_tuple(code),
Expand Down
44 changes: 22 additions & 22 deletions src/better_sqlite3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,49 +68,49 @@ class CS
v8::Local <v8::String> Code (v8::Isolate * isolate, int code);
#line 10 "./src/util/constants.lzz"
explicit CS (v8::Isolate * isolate);
#line 119 "./src/util/constants.lzz"
v8::Global <v8::String> database;
#line 120 "./src/util/constants.lzz"
v8::Global <v8::String> reader;
v8::Global <v8::String> database;
#line 121 "./src/util/constants.lzz"
v8::Global <v8::String> source;
v8::Global <v8::String> reader;
#line 122 "./src/util/constants.lzz"
v8::Global <v8::String> memory;
v8::Global <v8::String> source;
#line 123 "./src/util/constants.lzz"
v8::Global <v8::String> readonly;
v8::Global <v8::String> memory;
#line 124 "./src/util/constants.lzz"
v8::Global <v8::String> name;
v8::Global <v8::String> readonly;
#line 125 "./src/util/constants.lzz"
v8::Global <v8::String> next;
v8::Global <v8::String> name;
#line 126 "./src/util/constants.lzz"
v8::Global <v8::String> length;
v8::Global <v8::String> next;
#line 127 "./src/util/constants.lzz"
v8::Global <v8::String> done;
v8::Global <v8::String> length;
#line 128 "./src/util/constants.lzz"
v8::Global <v8::String> value;
v8::Global <v8::String> done;
#line 129 "./src/util/constants.lzz"
v8::Global <v8::String> changes;
v8::Global <v8::String> value;
#line 130 "./src/util/constants.lzz"
v8::Global <v8::String> lastInsertRowid;
v8::Global <v8::String> changes;
#line 131 "./src/util/constants.lzz"
v8::Global <v8::String> statement;
v8::Global <v8::String> lastInsertRowid;
#line 132 "./src/util/constants.lzz"
v8::Global <v8::String> column;
v8::Global <v8::String> statement;
#line 133 "./src/util/constants.lzz"
v8::Global <v8::String> table;
v8::Global <v8::String> column;
#line 134 "./src/util/constants.lzz"
v8::Global <v8::String> type;
v8::Global <v8::String> table;
#line 135 "./src/util/constants.lzz"
v8::Global <v8::String> totalPages;
v8::Global <v8::String> type;
#line 136 "./src/util/constants.lzz"
v8::Global <v8::String> totalPages;
#line 137 "./src/util/constants.lzz"
v8::Global <v8::String> remainingPages;
#line 138 "./src/util/constants.lzz"
#line 139 "./src/util/constants.lzz"
private:
#line 140 "./src/util/constants.lzz"
#line 141 "./src/util/constants.lzz"
static void SetString (v8::Isolate * isolate, v8::Global <v8::String> & constant, char const * str);
#line 144 "./src/util/constants.lzz"
#line 145 "./src/util/constants.lzz"
void SetCode (v8::Isolate * isolate, int code, char const * str);
#line 150 "./src/util/constants.lzz"
#line 151 "./src/util/constants.lzz"
std::unordered_map <int, v8::Global<v8::String> > codes;
};
#line 1 "./src/util/bind-map.lzz"
Expand Down
1 change: 1 addition & 0 deletions src/util/constants.lzz
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public:
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");
}

v8::Global<v8::String> database;
Expand Down

0 comments on commit 0a38c3b

Please sign in to comment.