From 77c708cbb7a4fb49db50a8917bdcdd777eff6ccb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 16 Oct 2026 08:44:55 +0100 Subject: Check primary key field exists --- hobgoblin/src/ast/typed.hob | 3 ++- hobgoblin/src/types.hob | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'hobgoblin') 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 { +} -- cgit v1.2.3