Skip to content

Commit

Permalink
Merge pull request #3 from gertrude-app/monitoring-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredh159 authored Aug 23, 2022
2 parents 6152341 + bc0502e commit cb73f67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Sources/DuetSQL/WhereConstraint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ public func != <M: Model>(

infix operator |=|

public func |=| <M: Model>(
lhs: M.ColumnName,
rhs: [UUIDStringable]
) -> SQL.WhereConstraint<M> {
.in(lhs, rhs.map { .uuid($0) })
}

public func |=| <M: Model>(
lhs: M.ColumnName,
rhs: [M.IdValue]
Expand Down
1 change: 1 addition & 0 deletions codegen/lib/models/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ function keyPath(
if (
type === `Id` ||
type === `UUID` ||
type === `[UUID]` ||
model.taggedTypes[type] === `UUID` ||
globalTypes.taggedTypes[type] === `UUID` ||
type.endsWith(`.Id`)
Expand Down
2 changes: 1 addition & 1 deletion codegen/lib/models/model-attrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function setMigrationNumber(model: Model, lines: string[]): void {
if (line.startsWith(`}`)) {
return;
}
const migrationMatch = line.match(/^ enum M(\d+) {$/);
const migrationMatch = line.match(/^ enum M(\d+)(: TableNamingMigration)? {$/);
if (migrationMatch && !Number.isNaN(Number(migrationMatch[1]))) {
inMigration = Number(migrationMatch[1]);
}
Expand Down

0 comments on commit cb73f67

Please sign in to comment.