Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify Access column datatypes and their XSD equivalents #1

Open
redmer opened this issue Mar 10, 2023 · 0 comments
Open

Verify Access column datatypes and their XSD equivalents #1

redmer opened this issue Mar 10, 2023 · 0 comments

Comments

@redmer
Copy link
Owner

redmer commented Mar 10, 2023

[ColumnType.BigInt]: (v: bigint) => [v.toString(), XSD("integer")],
[ColumnType.Binary]: (v: Buffer) => [v.toString("base64"), XSD("base64Binary")],
[ColumnType.Boolean]: (v: boolean) => [v ? "true" : "false", XSD("boolean")],
[ColumnType.Byte]: (v: number) => [v.toString(), XSD("byte")],
[ColumnType.Complex]: (v: number) => [v.toString(), XSD("number")],
[ColumnType.Currency]: (v: string) => [v, XSD("string")],
[ColumnType.DateTime]: (v: Date) => [v.toISOString(), XSD("dateTime")],
[ColumnType.DateTimeExtended]: (v: string) => [v, XSD("string")],
[ColumnType.Double]: (v: number) => [v.toString(), XSD("double")],
[ColumnType.Float]: (v: number) => [v.toString(), XSD("float")],
[ColumnType.Integer]: (v: number) => [v.toFixed(0), XSD("int")],
[ColumnType.Long]: (v: number) => [v.toFixed(0), XSD("long")],
[ColumnType.Memo]: (v: string) => [v, XSD("string")],
[ColumnType.Numeric]: (v: string) => [v, XSD("string")],
[ColumnType.OLE]: (v: Buffer) => [v.toString("base64"), XSD("base64Binary")],
[ColumnType.RepID]: (v: string) => [v, XSD("string")],
[ColumnType.Text]: (v: string) => [v, XSD("string")],

These equivalencies may not be accurate, as the definition of what constitutes a int differs between the formal range of xsd:int and the values allowed by Access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant