good morning!!!!

Skip to content
Snippets Groups Projects
Commit ef58b25d authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Add test for raw ordering.

parent 6067f785
Branches
Tags
No related merge requests found
......@@ -116,6 +116,11 @@ func TestSelect(t *testing.T) {
b.Select().From("artist").OrderBy("name DESC").String(),
)
assert.Equal(
`SELECT * FROM "artist" ORDER BY RAND()`,
b.Select().From("artist").OrderBy(db.Raw("RAND()")).String(),
)
assert.Equal(
`SELECT * FROM "artist" ORDER BY "name" DESC`,
b.Select().From("artist").OrderBy("-name").String(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment