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 08e0ca7c
authored
Jul 17, 2014
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A small step closer to making schema.test.js 'should support including date fields' work for sqlite
1 parent
9430706b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
lib/dialects/sqlite/connection-manager.js
lib/dialects/sqlite/index.js
lib/model.js
lib/dialects/sqlite/connection-manager.js
View file @
08e0ca7
...
@@ -23,7 +23,7 @@ ConnectionManager.prototype.getConnection = function(options) {
...
@@ -23,7 +23,7 @@ ConnectionManager.prototype.getConnection = function(options) {
var
self
=
this
;
var
self
=
this
;
options
=
options
||
{};
options
=
options
||
{};
options
.
uuid
=
options
.
uuid
||
'default'
;
options
.
uuid
=
options
.
uuid
||
'default'
;
if
(
self
.
connections
[
options
.
uuid
])
return
Promise
.
resolve
(
self
.
connections
[
options
.
uuid
]);
if
(
self
.
connections
[
options
.
uuid
])
return
Promise
.
resolve
(
self
.
connections
[
options
.
uuid
]);
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
...
@@ -49,4 +49,4 @@ ConnectionManager.prototype.releaseConnection = function(connection) {
...
@@ -49,4 +49,4 @@ ConnectionManager.prototype.releaseConnection = function(connection) {
}
}
};
};
module
.
exports
=
ConnectionManager
;
module
.
exports
=
ConnectionManager
;
\ No newline at end of file
lib/dialects/sqlite/index.js
View file @
08e0ca7
...
@@ -18,4 +18,4 @@ SqliteDialect.prototype.supports = _.defaults({
...
@@ -18,4 +18,4 @@ SqliteDialect.prototype.supports = _.defaults({
SqliteDialect
.
prototype
.
Query
=
Query
;
SqliteDialect
.
prototype
.
Query
=
Query
;
SqliteDialect
.
prototype
.
name
=
'sqlite'
;
SqliteDialect
.
prototype
.
name
=
'sqlite'
;
module
.
exports
=
SqliteDialect
;
module
.
exports
=
SqliteDialect
;
\ No newline at end of file
lib/model.js
View file @
08e0ca7
...
@@ -651,7 +651,7 @@ module.exports = (function() {
...
@@ -651,7 +651,7 @@ module.exports = (function() {
var
hasJoin
=
false
var
hasJoin
=
false
,
tableNames
=
{
};
,
tableNames
=
{
};
tableNames
[
this
.
tableName
]
=
true
;
tableNames
[
this
.
getTableName
()
]
=
true
;
options
=
optClone
(
options
||
{});
options
=
optClone
(
options
||
{});
if
(
typeof
options
===
'object'
)
{
if
(
typeof
options
===
'object'
)
{
...
@@ -722,7 +722,7 @@ module.exports = (function() {
...
@@ -722,7 +722,7 @@ module.exports = (function() {
,
keysLength
=
keys
.
length
,
keysLength
=
keys
.
length
,
tableNames
=
{
};
,
tableNames
=
{
};
tableNames
[
this
.
tableName
]
=
true
;
tableNames
[
this
.
getTableName
()
]
=
true
;
// options is not a hash but an id
// options is not a hash but an id
if
(
typeof
options
===
'number'
)
{
if
(
typeof
options
===
'number'
)
{
...
@@ -1738,7 +1738,7 @@ module.exports = (function() {
...
@@ -1738,7 +1738,7 @@ module.exports = (function() {
throw
new
Error
(
'Include malformed. Expected attributes: model'
);
throw
new
Error
(
'Include malformed. Expected attributes: model'
);
}
}
tableNames
[
include
.
model
.
tableName
]
=
true
;
tableNames
[
include
.
model
.
getTableName
()
]
=
true
;
if
(
include
.
hasOwnProperty
(
'attributes'
))
{
if
(
include
.
hasOwnProperty
(
'attributes'
))
{
include
.
originalAttributes
=
include
.
attributes
.
slice
(
0
);
include
.
originalAttributes
=
include
.
attributes
.
slice
(
0
);
...
...
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