SQLite
This commit is contained in:
17
node_modules/better-sqlite3/src/util/data-converter.cpp
generated
vendored
Normal file
17
node_modules/better-sqlite3/src/util/data-converter.cpp
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
class DataConverter {
|
||||
public:
|
||||
|
||||
void ThrowDataConversionError(sqlite3_context* invocation, bool isBigInt) {
|
||||
if (isBigInt) {
|
||||
ThrowRangeError((GetDataErrorPrefix() + " a bigint that was too big").c_str());
|
||||
} else {
|
||||
ThrowTypeError((GetDataErrorPrefix() + " an invalid value").c_str());
|
||||
}
|
||||
PropagateJSError(invocation);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void PropagateJSError(sqlite3_context* invocation) = 0;
|
||||
virtual std::string GetDataErrorPrefix() = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user