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 048516f8
authored
Jan 28, 2014
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle null blobs properly in sqlite, closes #1306
1 parent
5b9ff3d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
lib/dialects/sqlite/query.js
test/dao-factory.test.js
lib/dialects/sqlite/query.js
View file @
048516f
...
@@ -111,7 +111,9 @@ module.exports = (function() {
...
@@ -111,7 +111,9 @@ module.exports = (function() {
result
[
name
]
=
new
Date
(
val
+
'Z'
)
// Z means UTC
result
[
name
]
=
new
Date
(
val
+
'Z'
)
// Z means UTC
}
}
}
else
if
(
metaData
.
columnTypes
[
name
].
lastIndexOf
(
'BLOB'
)
!==
-
1
)
{
}
else
if
(
metaData
.
columnTypes
[
name
].
lastIndexOf
(
'BLOB'
)
!==
-
1
)
{
result
[
name
]
=
new
Buffer
(
result
[
name
])
if
(
result
[
name
])
{
result
[
name
]
=
new
Buffer
(
result
[
name
])
}
}
}
}
}
}
}
...
...
test/dao-factory.test.js
View file @
048516f
...
@@ -1805,6 +1805,18 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
...
@@ -1805,6 +1805,18 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
})
})
})
})
})
it
(
"should work when the database returns null"
,
function
(
done
)
{
var
self
=
this
this
.
BlobUser
.
create
({
// create a null column
}).
success
(
function
(
user
)
{
self
.
BlobUser
.
find
(
user
.
id
).
success
(
function
(
user
)
{
expect
(
user
.
data
).
to
.
be
.
null
done
()
})
})
})
})
})
describe
(
"strings"
,
function
()
{
describe
(
"strings"
,
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