mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-01 21:31:04 +00:00
Improve infer type (#7137)
* Improve infer type Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> * Fix Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> --------- Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
5487e3bd7b
commit
16de0dd75b
@ -307,6 +307,12 @@ export function inferType (val: any): string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof val === 'object') {
|
if (typeof val === 'object') {
|
||||||
|
if (val == null) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
if (val instanceof Date) {
|
||||||
|
return '::text'
|
||||||
|
}
|
||||||
return '::jsonb'
|
return '::jsonb'
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
Reference in New Issue
Block a user