Skip to content

Commit

Permalink
fix(schema): strip underscore prefix from array element types
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Sep 23, 2022
1 parent c1b5508 commit 856496d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/tusken-schema/src/typescript/generateSchema.ts
Expand Up @@ -174,6 +174,9 @@ function renderColumns(columns: TableColumn[], isType?: boolean) {
return columns.map(col => {
let type = 't.' + col.informationSchemaValue.udt_name
if (col.isArray) {
if (type.startsWith('t._')) {
type = 't.' + type.slice(3)
}
type = isType ? `<${type}>` : `(${type})`
type = 't.array' + type
}
Expand Down

0 comments on commit 856496d

Please sign in to comment.