Skip to content

Commit c30831a

Browse files
committed
feat: Add all data types
1 parent f866bf5 commit c30831a

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

crates/primitives/src/js/column.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export class Column {
1414
this.dataType = dataType || DataTypes.String;
1515
}
1616

17+
uuid() {
18+
this.dataType = DataTypes.Uuid;
19+
return this;
20+
}
21+
1722
string() {
1823
this.dataType = DataTypes.String;
1924
return this;
@@ -24,6 +29,11 @@ export class Column {
2429
return this;
2530
}
2631

32+
number() {
33+
this.dataType = DataTypes.Number;
34+
return this;
35+
}
36+
2737
require(data: boolean) {
2838
this.required = data;
2939
return this;
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
export enum DataTypes {
2+
Null = "Null",
3+
Uuid = "Uuid",
24
String = "String",
3-
Boolean = "Boolean"
5+
Boolean = "Boolean",
6+
Number = "Number"
47
}

0 commit comments

Comments
 (0)