mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
fix
This commit is contained in:
1 parent
493d992d47
commit
ae49a0db76
3 files changed
+9
-7
No files matched your search
@@ -48,7 +48,7 @@ export function deleteQuery(
|
||||
}
|
||||
if (returning) {
|
||||
query +=
|
||||
enumArrayColumns === undefined
|
||||
enumArrayColumns === undefined || enumArrayColumns.length === 0
|
||||
? ` returning *`
|
||||
: ` returning *, ${enumArrayColumns.map((x) => `"${x}"::text[]`).join(',')}`
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export function insertQuery(
|
||||
}
|
||||
if (returning) {
|
||||
query +=
|
||||
enumArrayColumns === undefined
|
||||
enumArrayColumns === undefined || enumArrayColumns.length === 0
|
||||
? ` returning *`
|
||||
: ` returning *, ${enumArrayColumns.map((x) => `"${x}"::text[]`).join(',')}`
|
||||
}
|
||||
@@ -148,7 +148,7 @@ export function updateQuery(
|
||||
}
|
||||
if (returning) {
|
||||
query +=
|
||||
enumArrayColumns === undefined
|
||||
enumArrayColumns === undefined || enumArrayColumns.length === 0
|
||||
? ` returning *`
|
||||
: ` returning *, ${enumArrayColumns.map((x) => `"${x}"::text[]`).join(',')}`
|
||||
}
|
||||
|
||||
@@ -96,9 +96,12 @@ export class SqlRowService implements IRowService {
|
||||
})
|
||||
.map((column) => column.name)
|
||||
|
||||
let queryChains = this.query
|
||||
.from(this.table.name, this.table.schema ?? undefined)
|
||||
.select(`*,${enumArrayColumns.map((x) => `"${x}"::text[]`).join(',')}`)
|
||||
let queryChains =
|
||||
enumArrayColumns.length > 0
|
||||
? this.query
|
||||
.from(this.table.name, this.table.schema ?? undefined)
|
||||
.select(`*,${enumArrayColumns.map((x) => `"${x}"::text[]`).join(',')}`)
|
||||
: this.query.from(this.table.name, this.table.schema ?? undefined).select()
|
||||
|
||||
filters
|
||||
.filter((x) => x.value && x.value != '')
|
||||
|
||||
@@ -139,7 +139,6 @@ const RowEditor: FC<Props> = ({
|
||||
configuration.rowIdx = row!.idx
|
||||
}
|
||||
|
||||
console.log('onSaveChanges', payload)
|
||||
saveChanges(payload, isNewRecord, configuration, () => setLoading(false))
|
||||
} else {
|
||||
setLoading(false)
|
||||
|
||||
Reference in new issue
Block a user