@ovotech/potygen
Advanced tools
Comparing version 0.7.4 to 0.7.5
@@ -182,3 +182,3 @@ "use strict"; | ||
/^(IS NOT DISTINCT FROM|IS DISTINCT FROM|IS|AT TIME ZONE)/i, | ||
/^(->>|->|#>>|#>|@>|<@|\?\||\?\&|\?|#-|!!|<->)/, | ||
/^(->>|->|#>>|#>|@>|<@|@\?|\?\||\?\&|\?|#-|!!|<->)/, | ||
/^(\|\|)/, | ||
@@ -224,4 +224,4 @@ /^(\|)/, | ||
const ArrayIndexRange = astNode(26 /* Tag.SqlName.ArrayIndexRange */, (0, rd_parse_1.All)(ChildExpression, ':', ChildExpression)); | ||
const ArrayColumnIndex = astNode(27 /* Tag.SqlName.ArrayColumnIndex */, (0, rd_parse_1.All)(Column, SquareBrackets((0, rd_parse_1.Any)(ArrayIndexRange, ChildExpression)))); | ||
const ArrayIndex = astNode(28 /* Tag.SqlName.ArrayIndex */, SquareBrackets((0, rd_parse_1.Any)(ArrayIndexRange, ChildExpression))); | ||
const ArrayColumnIndex = astNode(27 /* Tag.SqlName.ArrayColumnIndex */, (0, rd_parse_1.All)(Column, (0, rd_parse_1.Plus)(SquareBrackets((0, rd_parse_1.Any)(ArrayIndexRange, ChildExpression))))); | ||
const ArrayIndex = astNode(28 /* Tag.SqlName.ArrayIndex */, (0, rd_parse_1.Plus)(SquareBrackets((0, rd_parse_1.Any)(ArrayIndexRange, ChildExpression)))); | ||
const CompositeAccess = astNode(29 /* Tag.SqlName.CompositeAccess */, (0, rd_parse_1.All)('.', Identifier)); | ||
@@ -228,0 +228,0 @@ const RowKeyword = astNode(39 /* Tag.SqlName.RowKeyword */, (0, rd_parse_1.All)(/^ROW/i, Brackets(List(ChildExpression)))); |
@@ -108,3 +108,5 @@ "use strict"; | ||
return [ | ||
...userDefinedTypes.map((item) => ({ name: item.name.name, source: item.comment })), | ||
...userDefinedTypes | ||
.map((item) => ({ name: item.name.name, source: item.comment })) | ||
.sort((0, util_1.orderBy)((item) => item.name)), | ||
...commonTypes.map((name) => ({ name, source: 'Native' })), | ||
@@ -111,0 +113,0 @@ ]; |
@@ -154,2 +154,11 @@ /** | ||
}; | ||
datemultirange: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
decimal: { | ||
@@ -164,2 +173,11 @@ postgresType: string; | ||
}; | ||
nummultirange: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
name: { | ||
@@ -190,2 +208,18 @@ postgresType: string; | ||
}; | ||
anycompatiblemultirange: { | ||
postgresType: string; | ||
type: TypeName.Any; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
anymultirange: { | ||
postgresType: string; | ||
type: TypeName.Any; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
anyelement: { | ||
@@ -234,10 +268,3 @@ postgresType: string; | ||
anyarray: TypeArray; | ||
anycompatiblearray: { | ||
postgresType: string; | ||
type: TypeName.Any; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
anycompatiblearray: TypeArray; | ||
anyrange: TypeArray; | ||
@@ -631,2 +658,20 @@ anycompatiblerange: { | ||
}; | ||
pg_brin_bloom_summary: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
pg_brin_minmax_multi_summary: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
pg_inherits: { | ||
@@ -1289,2 +1334,11 @@ postgresType: string; | ||
}; | ||
int4multirange: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
int2: { | ||
@@ -1317,2 +1371,11 @@ postgresType: string; | ||
}; | ||
int8multirange: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
int8: TypeBigInt; | ||
@@ -1561,2 +1624,20 @@ money: { | ||
}; | ||
tsmultirange: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
tstzmultirange: { | ||
postgresType: string; | ||
type: TypeName.String; | ||
literal?: string | undefined; | ||
comment?: string | undefined; | ||
nullable?: boolean | undefined; | ||
generated?: boolean | undefined; | ||
postgresDescription?: string | undefined; | ||
}; | ||
numrange: { | ||
@@ -1563,0 +1644,0 @@ postgresType: string; |
@@ -81,6 +81,10 @@ "use strict"; | ||
daterange: { ...exports.typeString, postgresType: 'daterange' }, | ||
datemultirange: { ...exports.typeString, postgresType: 'datemultirange' }, | ||
decimal: { ...exports.typeNumber, postgresType: 'decimal' }, | ||
nummultirange: { ...exports.typeString, postgresType: 'nummultirange' }, | ||
name: { ...exports.typeString, postgresType: 'name' }, | ||
any: { ...exports.typeAny, postgresType: 'any' }, | ||
anycompatible: { ...exports.typeAny, postgresType: 'anycompatible' }, | ||
anycompatiblemultirange: { ...exports.typeAny, postgresType: 'anycompatiblemultirange' }, | ||
anymultirange: { ...exports.typeAny, postgresType: 'anymultirange' }, | ||
anyelement: { ...exports.typeAny, postgresType: 'anyelement' }, | ||
@@ -93,3 +97,3 @@ anycompatibleelement: { ...exports.typeAny, postgresType: 'anycompatibleelement' }, | ||
anyarray: arr({ ...exports.typeAny, postgresType: 'anyarray' }), | ||
anycompatiblearray: { ...exports.typeAny, postgresType: 'anycompatiblearray' }, | ||
anycompatiblearray: arr({ ...exports.typeAny, postgresType: 'anycompatiblearray' }), | ||
anyrange: arr({ ...exports.typeString, postgresType: 'anyarray' }), | ||
@@ -139,2 +143,4 @@ anycompatiblerange: { ...exports.typeString, postgresType: 'anycompatiblerange' }, | ||
pg_indexes: { ...exports.typeString, postgresType: 'pg_indexes' }, | ||
pg_brin_bloom_summary: { ...exports.typeString, postgresType: 'pg_brin_bloom_summary' }, | ||
pg_brin_minmax_multi_summary: { ...exports.typeString, postgresType: 'pg_brin_minmax_multi_summary' }, | ||
pg_inherits: { ...exports.typeString, postgresType: 'pg_inherits' }, | ||
@@ -213,5 +219,7 @@ pg_init_privs: { ...exports.typeString, postgresType: 'pg_init_privs' }, | ||
int4range: { ...exports.typeString, postgresType: 'int4range' }, | ||
int4multirange: { ...exports.typeString, postgresType: 'int4multirange' }, | ||
int2: { ...exports.typeNumber, postgresType: 'int2' }, | ||
int4: { ...exports.typeNumber, postgresType: 'int4' }, | ||
int8range: { ...exports.typeString, postgresType: 'int8range' }, | ||
int8multirange: { ...exports.typeString, postgresType: 'int8multirange' }, | ||
int8: exports.typeBigInt, | ||
@@ -264,2 +272,4 @@ money: { ...exports.typeString, postgresType: 'money' }, | ||
tsrange: { ...exports.typeString, postgresType: 'tsrange' }, | ||
tsmultirange: { ...exports.typeString, postgresType: 'tsmultirange' }, | ||
tstzmultirange: { ...exports.typeString, postgresType: 'tstzmultirange' }, | ||
numrange: { ...exports.typeString, postgresType: 'numrange' }, | ||
@@ -374,3 +384,6 @@ tstzrange: { ...exports.typeString, postgresType: 'tstzrange' }, | ||
], | ||
'@@': [[exports.typeString, exports.typeString, exports.typeBoolean]], | ||
'@@': [ | ||
[exports.typeString, exports.typeString, exports.typeBoolean], | ||
[exports.typeJson, exports.typeString, exports.typeBoolean], | ||
], | ||
LIKE: [[exports.typeString, exports.typeString, exports.typeBoolean]], | ||
@@ -399,2 +412,3 @@ ILIKE: [[exports.typeString, exports.typeString, exports.typeBoolean]], | ||
'<->': [[exports.typeString, exports.typeString, exports.typeString]], | ||
'@?': [[exports.typeJson, exports.typeString, exports.typeBoolean]], | ||
'<@': [ | ||
@@ -401,0 +415,0 @@ [exports.typeString, exports.typeString, exports.typeBoolean], |
{ | ||
"name": "@ovotech/potygen", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"homepage": "https://github.com/ovotech/potygen/tree/main/packages/potygen", | ||
@@ -26,4 +26,6 @@ "description": "Postgres Typescript Generator", | ||
"test": "jest test --runInBand", | ||
"test:general": "jest --runInBand test --testPathIgnorePatterns='test/version/*'", | ||
"test:11": "jest test/version/11 --runInBand", | ||
"test:13": "jest test/version/13 --runInBand", | ||
"test:14": "jest test/version/14 --runInBand", | ||
"lint": "prettier --list-different '{src,test}/**/*.ts'" | ||
@@ -30,0 +32,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
646164
10290