2 using System.Collections.Generic;
4 namespace kinetica.SchemaBuilder;
27 private readonly List<string> _properties;
34 _properties =
new List<string>();
42 AddIfNotExists(
"primary_key");
51 AddIfNotExists(
"shard_key");
60 AddIfNotExists(
"nullable");
69 AddIfNotExists(
"timestamp");
78 AddIfNotExists(
"data");
87 AddIfNotExists(
"ipv4");
96 AddIfNotExists(
"wkt");
117 _ =>
throw new ArgumentException($
"Invalid char length: {n}. Must be 1, 2, 4, 8, 16, 32, 64, 128, or 256.", nameof(n))
119 AddIfNotExists(prop);
128 AddIfNotExists(
"int8");
137 AddIfNotExists(
"int16");
146 AddIfNotExists(
"date");
155 AddIfNotExists(
"time");
164 AddIfNotExists(
"datetime");
173 AddIfNotExists(
"decimal");
182 AddIfNotExists(
"uuid");
191 AddIfNotExists(
"ulong");
200 AddIfNotExists(
"boolean");
209 AddIfNotExists(
"json");
218 AddIfNotExists(
"array");
227 AddIfNotExists(
"vector");
236 if (!
string.IsNullOrEmpty(property))
237 AddIfNotExists(property);
246 return new List<string>(_properties);
249 private void AddIfNotExists(
string property)
251 if (!_properties.Contains(property))
252 _properties.Add(property);
KineticaColumnProperties Decimal()
Marks the column as a decimal type.
KineticaColumnProperties Property(string property)
Adds a custom property.
KineticaColumnProperties Uuid()
Marks the column as a UUID type.
KineticaColumnProperties Nullable()
Marks the column as nullable.
KineticaColumnProperties Vector()
Marks the column as a vector type.
KineticaColumnProperties DateTime()
Marks the column as a datetime type.
KineticaColumnProperties Timestamp()
Marks the column as a timestamp type.
KineticaColumnProperties PrimaryKey()
Marks the column as a primary key.
KineticaColumnProperties CharN(int n)
Marks the column as a char(N) type.
KineticaColumnProperties ShardKey()
Marks the column as a shard key.
KineticaColumnProperties Wkt()
Marks the column as a WKT (Well-Known Text) geometry type.
KineticaColumnProperties Time()
Marks the column as a time type.
KineticaColumnProperties Json()
Marks the column as a JSON type.
KineticaColumnProperties Date()
Marks the column as a date type.
KineticaColumnProperties()
Creates a new KineticaColumnProperties builder.
Builder for Kinetica column properties.
KineticaColumnProperties Int8()
Marks the column as an int8 type.
KineticaColumnProperties Int16()
Marks the column as an int16 type.
IList< string > Build()
Builds the list of properties.
KineticaColumnProperties Ulong()
Marks the column as an unsigned long type.
KineticaColumnProperties Data()
Marks the column as a data column (text search enabled).
KineticaColumnProperties Array()
Marks the column as an array type.
KineticaColumnProperties Boolean()
Marks the column as a boolean type.
KineticaColumnProperties Ipv4()
Marks the column as an IPv4 type.