Skip to content
Draft
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
9 changes: 7 additions & 2 deletions internal/shared/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const (
TypeKindDoublePrecision
TypeKindNumeric
TypeKindBool
TypeKindBinary
TypeKindTimestampTz
TypeKindAny
)
Expand All @@ -42,6 +43,8 @@ func (k TypeKind) String() string {
return "numeric"
case TypeKindBool:
return "bool"
case TypeKindBinary:
return "bytea"
case TypeKindTimestampTz:
return "timestamp with time zone"
}
Expand Down Expand Up @@ -69,9 +72,11 @@ var (
TypeNullableDoublePrecision = Type{Kind: TypeKindDoublePrecision, Nullable: true}
TypeNumeric = Type{Kind: TypeKindNumeric, Nullable: false}
TypeNullableNumeric = Type{Kind: TypeKindNumeric, Nullable: true}
TypeBool = Type{Kind: TypeKindBool, Nullable: false}
TypeBool = Type{Kind: TypeKindBool, Nullable: false} // TODO - parse true yes on 1 (or unique prefix); false no off 0 (or unique prefix)
TypeNullableBool = Type{Kind: TypeKindBool, Nullable: true}
TypeTimestampTz = Type{Kind: TypeKindTimestampTz, Nullable: false}
TypeBinary = Type{Kind: TypeKindBinary, Nullable: false}
TypeNullableBinary = Type{Kind: TypeKindBinary, Nullable: true}
TypeTimestampTz = Type{Kind: TypeKindTimestampTz, Nullable: false} // TODO - add date, time, and interval
TypeNullableTimestampTz = Type{Kind: TypeKindTimestampTz, Nullable: true}
TypeAny = Type{Kind: TypeKindAny, Nullable: false}
TypeNullableAny = Type{Kind: TypeKindAny, Nullable: true}
Expand Down