mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 16:57:08 +02:00
without stringify
This commit is contained in:
parent
2af14e83a4
commit
75688a2e7a
|
|
@ -7,6 +7,7 @@ export class Column {
|
|||
| 'varchar'
|
||||
| 'text'
|
||||
| 'json'
|
||||
| 'jsonb'
|
||||
| 'timestamptz'
|
||||
| 'timestamp'
|
||||
| 'uuid'
|
||||
|
|
@ -73,6 +74,11 @@ export class Column {
|
|||
return this;
|
||||
}
|
||||
|
||||
get jsonb() {
|
||||
this.type = 'jsonb';
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use `timestampTimezone` instead
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ function getConditionAndParams(
|
|||
}
|
||||
|
||||
// For filters, we let TypeORM handle date conversion through parameterized queries.
|
||||
let value = filter.value;
|
||||
const value = filter.value;
|
||||
let postfix = '';
|
||||
if (typeof value === 'object' && !(value instanceof Date)) {
|
||||
value = JSON.stringify(value);
|
||||
// value = JSON.stringify(value);
|
||||
if (dbType === 'postgres') {
|
||||
postfix = '::jsonb';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export function toDslColumns(columns: DataTableCreateColumnSchema[]): DslColumn[
|
|||
case 'date':
|
||||
return name.timestampTimezone();
|
||||
case 'json':
|
||||
return name.json;
|
||||
return name.jsonb;
|
||||
default:
|
||||
return name.text;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user