Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Kosztka
Pod
Commits
1355923a
Commit
1355923a
authored
4 years ago
by
tbren
Browse files
Options
Download
Email Patches
Plain Diff
Revert temporary fix
parent
39d532ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sql_converters.rs
+0
-10
src/sql_converters.rs
with
0 additions
and
10 deletions
+0
-10
src/sql_converters.rs
+
0
-
10
View file @
1355923a
...
...
@@ -103,16 +103,6 @@ pub fn json_value_to_sqlite<'a>(
}
}
Value
::
Bool
(
b
)
if
BOOL_COLUMNS
.contains
(
column
)
=>
Ok
((
if
*
b
{
1
}
else
{
0
})
.into
()),
Value
::
Number
(
n
)
if
BOOL_COLUMNS
.contains
(
column
)
=>
{
if
let
Some
(
int
)
=
n
.as_f64
()
{
Ok
(
ToSqlOutput
::
Borrowed
(
ValueRef
::
Real
(
int
)))
}
else
{
Err
(
Error
{
code
:
StatusCode
::
BAD_REQUEST
,
msg
:
format!
(
"Failed to parse JSON number {} to BOOL ({})"
,
n
,
column
),
})
}
}
Value
::
Number
(
n
)
if
DATE_TIME_COLUMNS
.contains
(
column
)
=>
{
if
let
Some
(
int
)
=
n
.as_i64
()
{
Ok
(
ToSqlOutput
::
Borrowed
(
ValueRef
::
Integer
(
int
)))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
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 comment
Menu
Explore
Projects
Groups
Snippets