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
481cfbbb
Commit
481cfbbb
authored
Feb 21, 2011
by
Konstantin Käfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow start binding parameters from another start index
parent
dd0e118b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
statement.cc
src/statement.cc
+3
-3
statement.h
src/statement.h
+1
-1
No files found.
src/statement.cc
View file @
481cfbbb
...
...
@@ -172,17 +172,17 @@ int Statement::EIO_AfterPrepare(eio_req *req) {
return
0
;
}
template
<
class
T
>
T
*
Statement
::
Bind
(
const
Arguments
&
args
)
{
template
<
class
T
>
T
*
Statement
::
Bind
(
const
Arguments
&
args
,
int
start
)
{
int
last
=
args
.
Length
();
Local
<
Function
>
callback
;
if
(
last
>
0
&&
args
[
last
-
1
]
->
IsFunction
())
{
if
(
last
>
start
&&
args
[
last
-
1
]
->
IsFunction
())
{
callback
=
Local
<
Function
>::
Cast
(
args
[
last
-
1
]);
last
--
;
}
T
*
baton
=
new
T
(
this
,
callback
);
for
(
int
i
=
0
;
i
<
last
;
i
++
)
{
for
(
int
i
=
start
;
i
<
last
;
i
++
)
{
if
(
args
[
i
]
->
IsString
())
{
String
::
Utf8Value
val
(
args
[
i
]
->
ToString
());
baton
->
parameters
.
push_back
(
new
Result
::
Text
(
val
.
length
(),
*
val
));
...
...
src/statement.h
View file @
481cfbbb
...
...
@@ -151,7 +151,7 @@ protected:
static
void
Finalize
(
Baton
*
baton
);
void
Finalize
();
template
<
class
T
>
T
*
Bind
(
const
Arguments
&
args
);
template
<
class
T
>
T
*
Bind
(
const
Arguments
&
args
,
int
start
=
0
);
bool
Bind
(
const
Result
::
Row
parameters
);
static
void
GetRow
(
Result
::
Row
*
row
,
sqlite3_stmt
*
stmt
);
...
...
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