Fix encodings
This commit is contained in:
parent
eb7fcd0219
commit
df62845cf9
|
@ -70,6 +70,10 @@ export function encodeTableId(tableId: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function encodeViewId(viewId: string) {
|
||||||
|
return encodeURIComponent(viewId)
|
||||||
|
}
|
||||||
|
|
||||||
export function breakExternalTableId(tableId: string) {
|
export function breakExternalTableId(tableId: string) {
|
||||||
const parts = tableId.split(DOUBLE_SEPARATOR)
|
const parts = tableId.split(DOUBLE_SEPARATOR)
|
||||||
let datasourceId = parts.shift()
|
let datasourceId = parts.shift()
|
||||||
|
|
|
@ -66,7 +66,7 @@ export function getSourceId(ctx: Ctx): { tableId: string; viewId?: string } {
|
||||||
if (docIds.isViewId(sourceId)) {
|
if (docIds.isViewId(sourceId)) {
|
||||||
return {
|
return {
|
||||||
tableId: utils.extractViewInfoFromID(sourceId).tableId,
|
tableId: utils.extractViewInfoFromID(sourceId).tableId,
|
||||||
viewId: sql.utils.encodeTableId(sourceId),
|
viewId: sql.utils.encodeViewId(sourceId),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return { tableId: sql.utils.encodeTableId(ctx.params.sourceId) }
|
return { tableId: sql.utils.encodeTableId(ctx.params.sourceId) }
|
||||||
|
|
Loading…
Reference in New Issue