メインコンテンツまでスキップ

エラー一覧

GASsma で発生するエラークラスの一覧です。

検索・クエリ系

エラーメッセージ発生条件
GassmaFindSelectOmitConflictErrorCannot use both select and omit in the same queryselectomit を同時に指定
NotFoundErrorAn operation failed because it depends on one or more records that were required but not found.findFirstOrThrow でレコードが見つからない
GassmaSkipNegativeErrorInvalid value for skip argument: Value can only be positive, found: {value}skip に負数を指定
GassmaLimitNegativeErrorInvalid value for limit argument: Value can only be positive, found: {value}limit に負数を指定

orderBy 系

エラーメッセージ発生条件
RelationOrderByUnsupportedTypeErrorCannot use orderBy on "{relationName}" (type: {relationType}). Only manyToOne and oneToOne are supported.oneToMany / manyToMany のリレーションでフィールドソートを使用
RelationOrderByCountUnsupportedTypeErrorCannot use _count orderBy on "{relationName}" (type: {relationType}). Only oneToMany and manyToMany are supported.manyToOne / oneToOne のリレーションで _count ソートを使用

集計系

エラーメッセージ発生条件
GassmaAggregateMaxErrorCannot produce a maximum value of more than one type._max で異なる型が混在
GassmaAggregateMinErrorCannot produce a maximum value of more than one type._min で異なる型が混在
GassmaAggregateSumErrorCannot produce a maximum value of more than one type._sum で数値以外の型が混在
GassmaAggregateAvgErrorCannot produce a maximum value of more than one type._avg で数値以外の型が混在
GassmaAggregateTypeErrorOnly "number", "string", "boolean", and "Date" types are supported._max / _min でサポートされていない型
GassmaAggregateSumTypeErrorOnly "number" type is supported._sum で数値以外の型
GassmaAggregateAvgTypeErrorOnly "number" type is supported._avg で数値以外の型

groupBy 系

エラーメッセージ発生条件
GassmaGroupByHavingDontWriteByErrorWhen using "having" other than "_avg", "_count", "_max", "_min", and "_sum", column names can be used only if they are written in the "by" field.havingby に含まれないカラムを使用

設定系

エラーメッセージ発生条件
GassmaInValidColumnValueErrorstartColumnValue and endColumnValue can only use number, [a-z] and [A-Z].changeSettings に無効な列値を指定

リレーション定義系

エラーメッセージ発生条件
RelationSheetNotFoundErrorSheet "{sheetName}" is not found in the spreadsheetリレーション定義のシートが存在しない
RelationMissingPropertyErrorRelation "{relationName}" on sheet "{sheetName}" is missing required property "{property}"リレーション定義の必須プロパティが欠落
RelationInvalidPropertyTypeErrorRelation "{relationName}" on sheet "{sheetName}": property "{property}" must be a {expectedType}リレーション定義のプロパティの型が不正
RelationInvalidTypeErrorRelation "{relationName}" on sheet "{sheetName}": type "{value}" is not valid. Must be one of: oneToMany, oneToOne, manyToOne, manyToManyリレーションの type が無効
RelationColumnNotFoundErrorColumn "{columnName}" is not found in sheet "{sheetName}"リレーション定義の field / reference のカラムが存在しない
RelationInvalidOnDeleteErrorRelation "{relationName}" on sheet "{sheetName}": onDelete "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoActiononDelete の値が無効
RelationInvalidOnUpdateErrorRelation "{relationName}" on sheet "{sheetName}": onUpdate "{value}" is not valid. Must be one of: Cascade, SetNull, Restrict, NoActiononUpdate の値が無効

リレーション操作系

エラーメッセージ発生条件
GassmaRelationNotFoundErrorRelation "{relationName}" is not defined for sheet "{sheetName}"include で未定義のリレーション名を指定
GassmaRelationDuplicateErrorDuplicate value "{value}" found in "{sheetName}.{field}" for a unique relationoneToOne / manyToOne でリレーション先に重複値が存在
GassmaThroughRequiredErrorRelation "{relationName}" is manyToMany but "through" is not definedmanyToMany で through(中間テーブル)が未定義
RelationOnDeleteRestrictErrorCannot delete: related records exist for relation "{relationName}" (onDelete: Restrict)onDelete: "Restrict" 設定時に関連レコードが存在する状態で削除
RelationOnUpdateRestrictErrorCannot update: related records exist for relation "{relationName}" (onUpdate: Restrict)onUpdate: "Restrict" 設定時に関連レコードが存在する状態で PK を更新

include 系

エラーメッセージ発生条件
IncludeWithoutRelationsErrorCannot use include without defining relations in GassmaClientリレーション定義なしで include を使用
GassmaIncludeSelectConflictErrorCannot use both include and select in the same queryトップレベルで includeselect を同時使用
IncludeInvalidOptionTypeErrorInclude "{relationName}": option "{option}" must be {expectedType}include のオプション値の型が不正
IncludeSelectOmitConflictErrorInclude "{relationName}": cannot use both select and omit at the same timeinclude 内で selectomit を同時指定
IncludeSelectIncludeConflictErrorInclude "{relationName}": cannot use both select and include at the same timeinclude 内で selectinclude を同時指定

where リレーションフィルタ系

エラーメッセージ発生条件
WhereRelationInvalidFilterErrorFilter "{filterType}" cannot be used on relation "{relationName}" of type "{relationType}"リレーション型に不適切なフィルタを使用(例: oneToMany に is を使用)
WhereRelationWithoutContextErrorCannot use relation filters in where clause without defining relationsリレーション定義なしでリレーションフィルタを使用

Nested Write 系

エラーメッセージ発生条件
NestedWriteWithoutRelationsErrorCannot use nested write operations without defining relations in GassmaClientリレーション定義なしで Nested Write を使用
NestedWriteConnectNotFoundErrorNested write connect failed: no record found in "{sheetName}"connect / connectOrCreate で対象レコードが見つからない
NestedWriteRelationNotFoundErrorNested write failed: "{fieldName}" is not a defined relationNested Write で未定義のリレーション名を使用
NestedWriteInvalidOperationErrorNested write: operation "{operation}" is not valid for relation "{relationName}" of type "{relationType}"リレーション型に非対応の操作を使用(例: manyToMany に delete を使用)