fixed comment typo
This commit is contained in:
parent
0d4da9c3be
commit
c76ee987bd
|
|
@ -9,7 +9,7 @@ import (
|
||||||
// some normalizations for non-json columns.
|
// some normalizations for non-json columns.
|
||||||
func JSONEach(column string) string {
|
func JSONEach(column string) string {
|
||||||
// note: we are not using the new and shorter "if(x,y)" syntax for
|
// note: we are not using the new and shorter "if(x,y)" syntax for
|
||||||
// compatability with custom drivers that use older SQLite version
|
// compatibility with custom drivers that use older SQLite version
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
`json_each(CASE WHEN iif(json_valid([[%s]]), json_type([[%s]])='array', FALSE) THEN [[%s]] ELSE json_array([[%s]]) END)`,
|
`json_each(CASE WHEN iif(json_valid([[%s]]), json_type([[%s]])='array', FALSE) THEN [[%s]] ELSE json_array([[%s]]) END)`,
|
||||||
column, column, column, column,
|
column, column, column, column,
|
||||||
|
|
@ -24,7 +24,7 @@ func JSONEach(column string) string {
|
||||||
// Returns 0 for empty string or NULL column values.
|
// Returns 0 for empty string or NULL column values.
|
||||||
func JSONArrayLength(column string) string {
|
func JSONArrayLength(column string) string {
|
||||||
// note: we are not using the new and shorter "if(x,y)" syntax for
|
// note: we are not using the new and shorter "if(x,y)" syntax for
|
||||||
// compatability with custom drivers that use older SQLite version
|
// compatibility with custom drivers that use older SQLite version
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
`json_array_length(CASE WHEN iif(json_valid([[%s]]), json_type([[%s]])='array', FALSE) THEN [[%s]] ELSE (CASE WHEN [[%s]] = '' OR [[%s]] IS NULL THEN json_array() ELSE json_array([[%s]]) END) END)`,
|
`json_array_length(CASE WHEN iif(json_valid([[%s]]), json_type([[%s]])='array', FALSE) THEN [[%s]] ELSE (CASE WHEN [[%s]] = '' OR [[%s]] IS NULL THEN json_array() ELSE json_array([[%s]]) END) END)`,
|
||||||
column, column, column, column, column, column,
|
column, column, column, column, column, column,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue