Only cast money as numeric for Postgres
This commit is contained in:
parent
bc72b63579
commit
0fb46ca465
|
@ -94,7 +94,7 @@ function generateSelectStatement(json: QueryJson, knex: Knex): any[] {
|
||||||
const schema = meta?.table?.schema
|
const schema = meta?.table?.schema
|
||||||
return resource.fields.map(field => {
|
return resource.fields.map(field => {
|
||||||
const shortFieldName = field.match(/(?<=\.).*$/g)?.[0]
|
const shortFieldName = field.match(/(?<=\.).*$/g)?.[0]
|
||||||
if (shortFieldName) {
|
if (shortFieldName && knex.client.config.client === "pg") {
|
||||||
const externalType = schema?.[shortFieldName].externalType
|
const externalType = schema?.[shortFieldName].externalType
|
||||||
if (externalType?.includes("money")) {
|
if (externalType?.includes("money")) {
|
||||||
const fieldName = field.split(/\./g)
|
const fieldName = field.split(/\./g)
|
||||||
|
|
Loading…
Reference in New Issue