Skip to content

playerMatchEventLogの確認 #206

Description

@dai0413

matchフィールドエラー確認

db.playermatcheventlogs.aggregate([
  {
    $lookup: {
      from: "matches",
      localField: "match",
      foreignField: "_id",
      as: "matchDoc",
    },
  },
  {
    $match: {
      matchDoc: { $size: 0 },
    },
  },
  {
    $count: "invalidMatchCount",
  },
]);

エラーデータ削除

db.playermatcheventlogs.aggregate([
  {
    $lookup: {
      from: "matches",
      localField: "match",
      foreignField: "_id",
      as: "matchDoc",
    },
  },
  {
    $match: {
      matchDoc: { $size: 0 },
    },
  },
]).forEach(doc => {
  db.playermatcheventlogs.deleteOne({ _id: doc._id });
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions