summaryrefslogtreecommitdiff
path: root/hobgoblin/src
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-10-16 08:44:55 +0100
committerMichael Williamson <mike@zwobble.org>2026-10-16 08:44:55 +0100
commit77c708cbb7a4fb49db50a8917bdcdd777eff6ccb (patch)
tree4aeb55e2ff372c980e3893302a0f0166f656d67c /hobgoblin/src
parent8fe3ffe8c7aad4c3270b889bce0efaf4ab912157 (diff)
Check primary key field exists
Diffstat (limited to 'hobgoblin/src')
-rw-r--r--hobgoblin/src/ast/typed.hob3
-rw-r--r--hobgoblin/src/types.hob3
2 files changed, 5 insertions, 1 deletions
diff --git a/hobgoblin/src/ast/typed.hob b/hobgoblin/src/ast/typed.hob
index b65ecdd..a734d7c 100644
--- a/hobgoblin/src/ast/typed.hob
+++ b/hobgoblin/src/ast/typed.hob
@@ -2,6 +2,7 @@ import {DocComment} from ast;
import {Source} from sources;
import {
EnumType,
+ Field,
NamespaceName,
SimpleNativeType,
SimpleStructType,
@@ -89,7 +90,7 @@ sum TypedDatabaseSchemaStatementNode {
struct TypedTableDefinitionNode {
field name: String;
field rowType: StructType;
- field primaryKey: String;
+ field primaryKey: Field;
field docComment: DocComment;
field source: Source;
}
diff --git a/hobgoblin/src/types.hob b/hobgoblin/src/types.hob
index 5e96164..2473b6c 100644
--- a/hobgoblin/src/types.hob
+++ b/hobgoblin/src/types.hob
@@ -21,3 +21,6 @@ native SumType {
native TypeOrConstructor[T] {
}
+
+native Field {
+}