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 a100b16d
authored
Oct 06, 2012
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use new abstract query for postgresql and sqlite
1 parent
3ac912bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
28 deletions
lib/dialects/postgres/query.js
lib/dialects/query.js
lib/dialects/sqlite/query.js
lib/dialects/postgres/query.js
View file @
a100b16
var
Utils
=
require
(
"../../utils"
);
var
Utils
=
require
(
"../../utils"
)
,
AbstractQuery
=
require
(
'../abstract/query'
)
module
.
exports
=
(
function
()
{
module
.
exports
=
(
function
()
{
var
Query
=
function
(
client
,
sequelize
,
callee
,
options
)
{
var
Query
=
function
(
client
,
sequelize
,
callee
,
options
)
{
...
@@ -23,7 +24,7 @@ module.exports = (function() {
...
@@ -23,7 +24,7 @@ module.exports = (function() {
this
.
options
.
logging
=
function
(
s
)
{
console
.
log
(
s
)
}
this
.
options
.
logging
=
function
(
s
)
{
console
.
log
(
s
)
}
}
}
}
}
Utils
.
_
.
extend
(
Query
.
prototype
,
require
(
"../query"
).
prototype
)
Utils
.
inherit
(
Query
,
AbstractQuery
)
Query
.
prototype
.
run
=
function
(
sql
)
{
Query
.
prototype
.
run
=
function
(
sql
)
{
var
self
=
this
var
self
=
this
...
...
lib/dialects/query.js
deleted
100644 → 0
View file @
3ac912b
var
Utils
=
require
(
"../utils"
)
module
.
exports
=
(
function
()
{
var
Query
=
function
(
database
,
sequelize
,
callee
,
options
)
{
throw
new
Error
(
'Constructor was not overwritten!'
)
}
Utils
.
_
.
extend
(
Query
.
prototype
,
require
(
"../emitters/custom-event-emitter"
).
prototype
)
Query
.
prototype
.
run
=
function
(
sql
)
{
throw
new
Error
(
"The run method wasn't overwritten!"
)
}
Query
.
prototype
.
success
=
Query
.
prototype
.
ok
=
function
(
fct
)
{
this
.
on
(
'success'
,
fct
)
return
this
}
Query
.
prototype
.
failure
=
Query
.
prototype
.
fail
=
Query
.
prototype
.
error
=
function
(
fct
)
{
this
.
on
(
'error'
,
fct
)
return
this
}
return
Query
})()
lib/dialects/sqlite/query.js
View file @
a100b16
var
Utils
=
require
(
"../../utils"
)
var
Utils
=
require
(
"../../utils"
)
,
AbstractQuery
=
require
(
'../abstract/query'
)
module
.
exports
=
(
function
()
{
module
.
exports
=
(
function
()
{
var
Query
=
function
(
database
,
sequelize
,
callee
,
options
)
{
var
Query
=
function
(
database
,
sequelize
,
callee
,
options
)
{
...
@@ -21,7 +23,7 @@ module.exports = (function() {
...
@@ -21,7 +23,7 @@ module.exports = (function() {
this
.
options
.
logging
=
function
(
s
)
{
console
.
log
(
s
)
}
this
.
options
.
logging
=
function
(
s
)
{
console
.
log
(
s
)
}
}
}
}
}
Utils
.
_
.
extend
(
Query
.
prototype
,
require
(
"../query"
).
prototype
)
Utils
.
inherit
(
Query
,
AbstractQuery
)
Query
.
prototype
.
run
=
function
(
sql
)
{
Query
.
prototype
.
run
=
function
(
sql
)
{
var
self
=
this
var
self
=
this
...
...
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