Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
ae9a005b
Commit
ae9a005b
authored
Oct 01, 2019
by
Mohamed Akram
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support worker threads
parent
70766c74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
statement.cc
src/statement.cc
+2
-15
No files found.
src/statement.cc
View file @
ae9a005b
...
@@ -11,8 +11,6 @@
...
@@ -11,8 +11,6 @@
using
namespace
node_sqlite3
;
using
namespace
node_sqlite3
;
Napi
::
FunctionReference
Statement
::
constructor
;
Napi
::
FunctionReference
Statement
::
constructor
;
static
Napi
::
FunctionReference
date
;
static
Napi
::
FunctionReference
regexp
;
Napi
::
Object
Statement
::
Init
(
Napi
::
Env
env
,
Napi
::
Object
exports
)
{
Napi
::
Object
Statement
::
Init
(
Napi
::
Env
env
,
Napi
::
Object
exports
)
{
Napi
::
HandleScope
scope
(
env
);
Napi
::
HandleScope
scope
(
env
);
...
@@ -36,21 +34,10 @@ Napi::Object Statement::Init(Napi::Env env, Napi::Object exports) {
...
@@ -36,21 +34,10 @@ Napi::Object Statement::Init(Napi::Env env, Napi::Object exports) {
// A Napi InstanceOf for Javascript Objects "Date" and "RegExp"
// A Napi InstanceOf for Javascript Objects "Date" and "RegExp"
bool
OtherInstanceOf
(
Napi
::
Object
source
,
char
*
object_type
)
{
bool
OtherInstanceOf
(
Napi
::
Object
source
,
char
*
object_type
)
{
if
(
date
.
IsEmpty
())
{
Napi
::
Function
date_func
=
source
.
Env
().
Global
().
Get
(
"Date"
).
As
<
Function
>
();
Napi
::
Function
regexp_func
=
source
.
Env
().
Global
().
Get
(
"RegExp"
).
As
<
Function
>
();
date
=
Napi
::
Persistent
(
date_func
);
date
.
SuppressDestruct
();
regexp
=
Napi
::
Persistent
(
regexp_func
);
regexp
.
SuppressDestruct
();
}
if
(
object_type
==
"Date"
)
{
if
(
object_type
==
"Date"
)
{
return
source
.
InstanceOf
(
date
.
Value
());
return
source
.
InstanceOf
(
source
.
Env
().
Global
().
Get
(
"Date"
).
As
<
Function
>
());
}
else
if
(
object_type
==
"RegExp"
)
{
}
else
if
(
object_type
==
"RegExp"
)
{
return
source
.
InstanceOf
(
regexp
.
Value
());
return
source
.
InstanceOf
(
source
.
Env
().
Global
().
Get
(
"RegExp"
).
As
<
Function
>
());
}
}
return
false
;
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment