upsertNode method

Future<void> upsertNode(
  1. NodesCompanion entry
)

Insert or update a node. On conflict (same nodeId), the existing row is unconditionally overwritten with the incoming data.

Important: This method does NOT enforce freshness — callers are responsible for checking whether the incoming data is newer before calling this method. The AirpassSyncEngine._mergeNodes method performs this check by comparing lastSeen timestamps.

Implementation

Future<void> upsertNode(NodesCompanion entry) async {
  await into(nodes).insertOnConflictUpdate(entry);
}