Table of Contents

Enum DataType

Namespace
YndigoBlue.Velocity.Enums
Assembly
YndigoBlue.Velocity.dll

Defines the data types supported by Velocity across different database systems.

public enum DataType

Fields

Blob = 0

Binary Large Object for storing arbitrary binary data such as images, documents, or serialized objects. Maps to BLOB (DB2, MySQL, Oracle, SQLite, Teradata), BYTEA (PostgreSQL), and VARBINARY(MAX) (SQL Server). Represented in .NET as a byte array (byte[]).

Boolean = 1

Boolean/logical value representing true or false. Maps to a native BOOLEAN (PostgreSQL), TINYINT(1) (MySQL), BIT (SQL Server), NUMBER(1,0) (Oracle), SMALLINT (DB2), BYTEINT (Teradata), and INTEGER (SQLite). Represented in .NET as bool.

Byte = 2

8-bit unsigned integer with a range of 0 to 255. Maps to TINYINT (SQL Server), TINYINT UNSIGNED (MySQL), BYTEINT (Teradata), NUMBER(3,0) (Oracle), SMALLINT (DB2, PostgreSQL), and INTEGER (SQLite). Represented in .NET as byte.

Char = 3

Fixed-length character string, right-padded with spaces to the declared length. Maps to CHAR or CHARACTER in all supported databases. Use VarChar for variable-length text. Represented in .NET as string.

Clob = 4

Character Large Object for storing large amounts of text that exceeds the practical limits of VarChar. Maps to CLOB (DB2, Oracle, Teradata), LONGTEXT (MySQL), TEXT (PostgreSQL, SQLite), and NVARCHAR(MAX) (SQL Server). Represented in .NET as string.

Date = 5

Calendar date without a time component, storing year, month, and day only. Maps to DATE in all supported databases. Note that Oracle's DATE type also stores a time component. Represented in .NET as DateOnly. Use DateTime when both date and time are required.

Time = 6

Time of day without a date component, storing hours, minutes, seconds, and fractional seconds. Maps to TIME in all supported databases. Represented in .NET as TimeOnly. Use DateTime when both date and time are required.

DateTime = 7

Date and time without timezone information. Maps to DATETIME2 (SQL Server), DATETIME (MySQL), TIMESTAMP WITHOUT TIME ZONE (PostgreSQL), TIMESTAMP (DB2, Teradata), DATE (Oracle), and TEXT in ISO 8601 format (SQLite). Represented in .NET as DateTime. Use Timestamp when timezone-aware storage is required.

Decimal = 8

Fixed-precision decimal number, suitable for financial and monetary calculations where exact precision is essential. Maps to DECIMAL or NUMERIC in most databases, and NUMBER in Oracle and Teradata. Use the precision and scale column parameters to control total digits and decimal places. Represented in .NET as decimal.

Double = 9

Double-precision IEEE 754 floating-point number (64-bit) with approximately 15–17 significant decimal digits of precision. Maps to DOUBLE PRECISION (PostgreSQL, MySQL), FLOAT(53) (SQL Server), BINARY_DOUBLE (Oracle), DOUBLE (DB2, SQLite), and FLOAT (Teradata). Represented in .NET as double. For financial values requiring exact precision, use Decimal instead.

Float = 10

Single-precision IEEE 754 floating-point number (32-bit) with approximately 6–9 significant decimal digits of precision. Maps to REAL or FLOAT(24) (SQL Server), REAL (PostgreSQL), FLOAT (MySQL, DB2, Teradata, SQLite), and BINARY_FLOAT (Oracle). Represented in .NET as float. Prefer Double for greater precision or Decimal for exact values.

Geometry = 11

Planar (flat-earth) geometric spatial data type for storing points, lines, polygons, and other geometric shapes. (⚠️ Full Edition only) Maps to GEOMETRY (MySQL, PostGIS/PostgreSQL), ST_GEOMETRY (DB2, Teradata), SDO_GEOMETRY (Oracle), geometry (SQL Server), and GEOMETRY via SpatiaLite (SQLite). Represented in .NET using NetTopologySuite types. Use Geography for real-world geodetic coordinates.

Geography = 12

Geodetic (round-earth) geographic spatial data type for storing real-world locations using latitude and longitude. (⚠️ Full Edition only) Maps to GEOGRAPHY (SQL Server) and GEOGRAPHY via PostGIS (PostgreSQL). Limited to SQL Server and PostgreSQL only. Represented in .NET using NetTopologySuite types wrapped in a Geography object. Use Geometry for planar spatial data.

Integer = 13

32-bit signed integer with a range of -2,147,483,648 to 2,147,483,647. Maps to INT or INTEGER in all supported databases, and NUMBER(10,0) in Oracle. Represented in .NET as int. Use Long for values that may exceed the 32-bit range.

Interval = 14

Duration of time, backed by TimeSpan. Maps to INTERVAL DAY TO SECOND (Oracle), INTERVAL (PostgreSQL), and BIGINT ticks on DB2, MySQL, SQL Server, SQLite, and Teradata. Velocity handles the tick conversion automatically on read and write.

Long = 15

64-bit signed integer with a range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Maps to BIGINT in all supported databases, and NUMBER(19,0) in Oracle. Represented in .NET as long. Use when values may exceed the range of Integer.

Short = 16

16-bit signed integer with a range of -32,768 to 32,767. Maps to SMALLINT in all supported databases, NUMBER(5,0) in Oracle, and INTEGER in SQLite. Represented in .NET as short. For general-purpose integers, prefer Integer.

Timestamp = 17

Date and time with fractional seconds precision and timezone offset information. Maps to DATETIMEOFFSET (SQL Server), TIMESTAMP WITH TIME ZONE (PostgreSQL, Teradata), TIMESTAMP (Oracle, DB2, MySQL), and TEXT in ISO 8601 format (SQLite). Represented in .NET as DateTimeOffset. Use DateTime for timezone-agnostic values.

VarChar = 18

Variable-length character string up to a specified maximum length. The most commonly used string type in Velocity. Maps to NVARCHAR (SQL Server), VARCHAR2 (Oracle), VARCHAR (DB2, MySQL, PostgreSQL, Teradata), and TEXT (SQLite). Represented in .NET as string. Use Clob for very large text values.

String = 19

Special internal type representing a string value returned from a query where the specific string type cannot be determined. Not for use in column definitions — assigned automatically by Velocity when reading query results.

Query = 20

Special internal type used when a record value comes from a subquery rather than a literal value. Not for use in column definitions — assigned automatically by Velocity for DML statements driven by a SELECT.

Expression = 21

Special internal type used when a data type is determined dynamically from a computed expression at runtime. Not for use in column definitions — assigned automatically by Velocity for derived or computed values.

Guid = 22

Globally Unique Identifier (GUID / UUID) — a 128-bit value used to uniquely identify records across systems. Maps to UNIQUEIDENTIFIER (SQL Server), UUID (PostgreSQL), and CHAR(36) (DB2, MySQL, Oracle, SQLite, Teradata). Represented in .NET as Guid.

Unsupported = 23

Placeholder for a database-specific column type that has no equivalent in the Velocity type system. Assigned automatically when loading a schema that contains vendor-specific types Velocity cannot map. Columns with this type can be read in query results but cannot be used in DDL operations.

Remarks

Velocity provides a unified type system that maps to native database types. This abstraction allows code to work consistently across different database vendors. Some types are special-purpose and used only in specific contexts like queries or binding.