Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit e1dbc3a4
authored
Apr 10, 2013
by
Jochem Maas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
also drop "order" property for options passed to count() when using findAndCount()
1 parent
596d78f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
lib/dao-factory.js
spec-jasmine/dao-factory.spec.js
lib/dao-factory.js
View file @
e1dbc3a
...
@@ -256,6 +256,7 @@ module.exports = (function() {
...
@@ -256,6 +256,7 @@ module.exports = (function() {
// no limit or offset for the options given to count()
// no limit or offset for the options given to count()
copts
.
offset
=
0
;
copts
.
offset
=
0
;
copts
.
limit
=
0
;
copts
.
limit
=
0
;
copts
.
order
=
null
;
return
new
Utils
.
CustomEventEmitter
(
function
(
emitter
)
{
return
new
Utils
.
CustomEventEmitter
(
function
(
emitter
)
{
var
emit
=
{
var
emit
=
{
...
...
spec-jasmine/dao-factory.spec.js
View file @
e1dbc3a
...
@@ -247,6 +247,17 @@ describe('DAOFactory', function() {
...
@@ -247,6 +247,17 @@ describe('DAOFactory', function() {
})
})
})
})
it
(
"handles where clause with ordering [only]"
,
function
()
{
Helpers
.
async
(
function
(
done
)
{
User
.
findAndCount
({
where
:
"id != "
+
users
[
0
].
id
,
order
:
'id ASC'
}).
success
(
function
(
info
)
{
expect
(
info
.
count
).
toEqual
(
fullcount
-
1
)
expect
(
Array
.
isArray
(
info
.
rows
)).
toBeTruthy
()
expect
(
info
.
rows
.
length
).
toEqual
(
fullcount
-
1
)
done
()
})
})
})
/*
/*
// at time of writing (v1.6.0) Sequelize does not seem to support 'offset' on it's own consistently (goes wrong for PostGRES and SQLite)
// at time of writing (v1.6.0) Sequelize does not seem to support 'offset' on it's own consistently (goes wrong for PostGRES and SQLite)
it("handles offset", function() {
it("handles offset", function() {
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment