Skip to content

Data Types

Andrey Gershun edited this page May 29, 2015 · 3 revisions

Data Types

Basic data types

Integer (number with truncation)

  • smallint
  • integer
  • bigint

Decimal (number)

  • decimal
  • numeric

Floating-Point (number)

  • real
  • double precision

Serial (number with AUTO_INCREMENT)

  • smallserial
  • serial
  • bigserial (maximum 9999999999999998, not 9223372036854775807 like in Postgres)

Monetary (number)

  • money

Character (string)

  • character varying(n), varchar(n), nvarchar(n)
  • character(n), char(n), nchar(n)
  • text

Binary Data Types

  • TBD

Date/Time (string and Date)

  • date - string
  • time - string
  • interval (number) - in milliseconds
  • Date - JavaScript Date object class

Boolean (boolean)

  • boolean

Complex data types

Enumeration (array of strings or numbers)

  • enum

Geometric Types

  • Not realized

Network Address Types

  • Not realized

Bit String

  • Not realized

Text Search

  • tsvector - not realized
  • tsquery - not realized

UUID (string)

  • UUID

XML (object with special structure)

  • xml - partially realized for SEARCH
  • html - not realized

JSON (object)

  • json
  • jsonb - not yet realized

Array (object)

  • multidimensional array[] - not yet realized, but can be imitated with JSON type

Composite (object)

  • composite - not yet realized, but can be imitated with JSON type. See also CLASS type

Range (object)

  • numrange - not yet realized
  • tsrange - not yet realized
  • daterange - not yet realized

OID

  • not realized yet

Graph data types

Class (realized with tables)

  • class

Object (object)

  • object, json - JavaScript object class

Document (object)

  • TBD

Object reference (number or string)

  • TBD

Domain

  • TBD

Pseudo

  • not yet realized

AlaSQL supports a number of standard SQL and JavaScript data types.

Clone this wiki locally