String columns

You can define string fields of fixed or variable length.

For variable-length strings, the string length is stored as part of the string as a hidden integer. The storage used to hold the string length is not included in the length of the string.

The following examples show string field definitions:


record (var1:string[];) // variable-length string
record (var2:string;) // variable-length string; same as string[]
record (var3:string[80];) // fixed-length string of 80 bytes
record (var4:nullable string[80];) // nullable string
record (var5[10]:string;) // fixed-length vector of strings
record (var6[]:string[80];) // variable-length vector of strings

You can specify the maximum length of a string with the optional property max, as shown in the example below:


record (var7:string[max=80];)

The length of a fixed-length string must be at least 1.