RawQueryBuilder.removeCollection constructor
RawQueryBuilder.removeCollection({})
(en) Deletes the specified collection. This query is special because it deletes the collection itself. Therefore, it cannot be included as part of a transaction query. Additionally, any callbacks associated with the target collection will not be called when executed. This is a maintenance function for administrators who need to change the database structure. Typically, the database should be designed so that it never needs to be called.
(ja) 指定されたコレクションを削除します。 このクエリは特殊で、コレクションそのものが削除されるため トランザクションクエリの一部として含めることはできません。 また、実行時には対象のコレクションに紐付いたコールバックも呼ばれません。 これはDBの構造変更が必要な管理者のためのメンテナンス機能であり、 通常はこれを呼び出さないでも問題ない設計にしてください。
target: The collection name in DB.mustAffectAtLeastOne: If true, the operation will be marked as failed if it affects 0 objects. If the operation is treated as a failure, the isSuccess flag of the returned QueryResult will be set to false.cause: Optional metadata for auditing or logging. Useful in high-security environments or for autonomous AI programs to record the reason or initiator of a query.
Implementation
RawQueryBuilder.removeCollection({
required super.target,
super.mustAffectAtLeastOne,
super.cause,
}) : super.removeCollection();