Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/module-mongodb/src/api/MongoRouteAPIAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ export class MongoRouteAPIAdapter implements api.RouteAPI {
}
}
return [...columns.entries()].map(([key, value]) => {
const internal_type = value.bsonTypes.size == 0 ? '' : [...value.bsonTypes].join(' | ');
return {
name: key,
type: internal_type,
sqlite_type: value.sqliteType.typeFlags,
internal_type: value.bsonTypes.size == 0 ? '' : [...value.bsonTypes].join(' | ')
internal_type,
pg_type: internal_type
};
});
}
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ export const TableSchema = t.object({
* Full type name, e.g. "character varying(255)[]"
* @deprecated - use internal_type
*/
type: t.string.optional(),
type: t.string,

/**
* Internal postgres type, e.g. "varchar[]".
* @deprecated - use internal_type instead
*/
pg_type: t.string.optional()
pg_type: t.string
})
)
});
Expand Down
Loading