Search
ctrl/
Ask AI
Light
Dark
System

Datatypes

The .NET driver maps the following EdgeDB types to the corresponding:

Currently, EdgeDB does not support unsigned numbers. Using them with the .NET driver may result in unexpected behaviour.

EdgeDB Type

.NET Type

Set

IEnumerable<T>

array

T[]

anytuple

Tuple<T>

anyenum

Enum

Object

object

bool

bool

bytes

byte[]

str

string

cal::local_date

DataTypes.LocalData *

cal::local_time

DataTypes.LocalTime *

cal::local_datetime

DataTypes.LocalDateTime *

cal::relative_duration

DataTypes.RelativeDuration *

datetime

DataTypes.DateTime *

duration

DataTypes.Duration *

float32

float

float64

double

int16

short

int32

int

int64

long

bigint

BigInt

decimal

decimal

json

EdgeDB.DataTypes.Json

uuid

Guid

range()

EdgeDB.DataTypes.Range<T> **

* These types are only available in >=1.0.5, previous versions use the .NET system date/time types.

.NET system date/time types will be implicitly converted to the corresponding DataTypes.* type, and vice versa. It is important to note that the precision of EdgeDB types is microseconds, while .NETs are nanoseconds. This means that when converting from EdgeDB to .NET, the precision will be lost. When converting from .NET to EdgeDB, the precision will be rounded to the nearest microsecond. It’s highly recommended to use the DataTypes.* types when working with temporals to ensure the precision is not lost.

** The System.Range type will be implicitly converted to range<int32>. Note: since the .NET Range type only supports int32 values, using any other EdgeDB range type that isn’t int32 will not work. This is only available in >=1.0.5