Skip to main content

Datatypes (& using unsupported ones)

As of writing, the following data types are supported by NetDB:

Blueprint TypePostgreSQL Type/Counterpart
Integerbigint, integer and smallint (NOTE: serial and bigserial are also supported)
Stringvarchar, text and cstring
Floatreal (4 byte / 32-bit float) and double precision (8-byte / 64-bit float; converted OR use string)
Booleanboolean
Bytebytea (NOTE: We recommend using the Character data type instead)
Charactercharacter
Date & Time (NOTE: These will be saved & returned to the Blueprint as a string)abstime, data, time and timestamp

Using Unsupported Datatypes

Starting with NetDB version 1.0.11, data types that are not known to NetDB are retained as a string (as long as conversion is possible). This means that previously unsupported data types, such as JSON fields, GIS data and many more can now be accessed using NetDB.

While their data type will still be set to DT_UNSPEC, you can access their value using the Get Row Column as String node just like you would do for a (regular) string field. From there, you can do further processing/conversion of the data yourself.

As an example, you might wish to use the JSON or JSONB PostgreSQL data types. To do this, simply SELECT them from your database, iterate over the rows and use the Get Row Column as String node to get a string representation of the JSON record. From there, you can use a one of the many (free) JSON processing libraries available on the Unreal Engine marketplace, or pass them to C++ for conversion into a struct.

While we acknowledge that not all data types will have a (valid) string representation, we hope that the majority of unsupported data types will work in this way. Should you encounter any data types that cannot be stored as a string, but which you do feel are essential to the plugin, then please do not hesitate to reach out to us.