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 fca6f724
authored
Oct 28, 2015
by
Mick Hansen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4749 from Nicktho/patch-1
Update querying documentation
2 parents
2ec7baac
c87f4ea1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
docs/docs/querying.md
docs/docs/querying.md
View file @
fca6f72
...
@@ -254,6 +254,15 @@ something.findOne({
...
@@ -254,6 +254,15 @@ something.findOne({
// Will order by otherfunction(`col1`, 12, 'lalala') DESC
// Will order by otherfunction(`col1`, 12, 'lalala') DESC
[
sequelize
.
fn
(
'otherfunction'
,
sequelize
.
col
(
'col1'
),
12
,
'lalala'
),
'DESC'
],
[
sequelize
.
fn
(
'otherfunction'
,
sequelize
.
col
(
'col1'
),
12
,
'lalala'
),
'DESC'
],
// Will order by name on an associated User
[
User
,
'name'
,
'DESC'
],
// Will order by name on an associated User aliased as Friend
[{
model
:
User
,
as
:
'Friend'
},
'name'
,
'DESC'
],
// Will order by name on a nested associated Company of an associated User
[
User
,
Company
,
'name'
,
'DESC'
],
]
]
// All the following statements will be treated literally so should be treated with care
// All the following statements will be treated literally so should be treated with care
order
:
'convert(user_name using gbk)'
order
:
'convert(user_name using gbk)'
...
...
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