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
98645f53
Commit
98645f53
authored
Feb 21, 2011
by
Konstantin Käfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test empty resultset
parent
bd56d6ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
prepare.test.js
test/prepare.test.js
+18
-0
No files found.
test/prepare.test.js
View file @
98645f53
...
...
@@ -249,3 +249,21 @@ exports['test all() parameter binding'] = function(beforeExit) {
assert
.
equal
(
count
,
retrieved
,
"Didn't retrieve all rows"
);
});
};
exports
[
'test all() without results'
]
=
function
(
beforeExit
)
{
var
db
=
new
sqlite3
.
Database
(
'test/support/prepare.db'
,
sqlite3
.
OPEN_READONLY
);
var
empty
=
false
;
db
.
prepare
(
"SELECT txt, num, flt, blb FROM foo WHERE num > 5000"
)
.
all
(
function
(
err
,
rows
)
{
if
(
err
)
throw
err
;
assert
.
ok
(
rows
.
length
===
0
);
empty
=
true
;
});
beforeExit
(
function
()
{
assert
.
ok
(
empty
,
"Didn't retrieve an empty result set"
);
});
};
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