diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 332f0cf0..0d5cfb21 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -23,13 +23,15 @@ jobs: - name: Install EdgeDB uses: edgedb/setup-edgedb@v1 with: - server-version: 3.0-rc.1 + server-version: nightly - name: Set up chrome uses: browser-actions/setup-chrome@v1 + with: + chrome-version: stable - name: Set up chromedriver - uses: nanasess/setup-chromedriver@v1 + uses: nanasess/setup-chromedriver@v2 - name: Install dev deps working-directory: web diff --git a/shared/common/schemaData/index.ts b/shared/common/schemaData/index.ts index 03f5978b..f8df893a 100644 --- a/shared/common/schemaData/index.ts +++ b/shared/common/schemaData/index.ts @@ -83,6 +83,14 @@ export interface SchemaRangeType { elementType: SchemaType; } +export interface SchemaMultirangeType { + schemaType: "Multirange"; + id: string; + name: string; + escapedName: string; + elementType: SchemaType; +} + interface _SchemaPointer { schemaType: "Pointer"; id: string; @@ -158,6 +166,7 @@ export type SchemaType = | SchemaArrayType | SchemaTupleType | SchemaRangeType + | SchemaMultirangeType | SchemaObjectType; export interface SchemaParam { @@ -386,6 +395,14 @@ export function buildTypesGraph(data: RawIntrospectionResult): { name: type.name, } as any); break; + case "schema::Multirange": + case "schema::MultirangeExprAlias": + types.set(type.id, { + schemaType: "Multirange", + id: type.id, + name: type.name, + } as any); + break; case "schema::ObjectType": types.set(type.id, { schemaType: "Object", @@ -727,7 +744,9 @@ export function buildTypesGraph(data: RawIntrospectionResult): { break; } case "schema::Range": - case "schema::RangeExprAlias": { + case "schema::RangeExprAlias": + case "schema::Multirange": + case "schema::MultirangeExprAlias": { const elementType = types.get(type.range_element_type_id!); if (!elementType) { throw new Error( @@ -824,7 +843,8 @@ export function buildTypesGraph(data: RawIntrospectionResult): { if ( type.schemaType === "Array" || type.schemaType === "Tuple" || - type.schemaType === "Range" + type.schemaType === "Range" || + type.schemaType === "Multirange" ) { const [name, escapedName] = getNameOfSchemaType(type); type.name = name; @@ -909,6 +929,11 @@ export function getNameOfSchemaType(type: SchemaType): [string, string] { `range<${type.elementType.name}>`, `range<${type.elementType.escapedName}>`, ]; + case "Multirange": + return [ + `multirange<${type.elementType.name}>`, + `multirange<${type.elementType.escapedName}>`, + ]; default: throw new Error(`unknown schema type: ${(type as any).schemaType}`); } diff --git a/shared/common/schemaData/queries.ts b/shared/common/schemaData/queries.ts index ab65917c..dc555b8c 100644 --- a/shared/common/schemaData/queries.ts +++ b/shared/common/schemaData/queries.ts @@ -83,7 +83,8 @@ select Type { ).id, constraintIds := [is ConsistencySubject].constraints.id, element_type_id := [is Array].element_type.id, - range_element_type_id := [is Range].element_type.id, + range_element_type_id := [is Range].element_type.id + ?? [is Multirange].element_type.id, [is Tuple].element_types: { name, type_id := .type.id, diff --git a/shared/studio/state/database.ts b/shared/studio/state/database.ts index f5b63611..751cc22e 100644 --- a/shared/studio/state/database.ts +++ b/shared/studio/state/database.ts @@ -54,7 +54,7 @@ import {SessionState, sessionStateCtx} from "./sessionState"; export const dbCtx = createMobxContext(); -const SCHEMA_DATA_VERSION = 5; +const SCHEMA_DATA_VERSION = 6; export interface StoredSchemaData { version: number;