logs method

Future<void> logs(
  1. DatabaseSession session,
  2. SessionLogEntry sessionLogEntry,
  3. LogEntry logEntry, {
  4. Transaction? transaction,
})

Creates a relation between this SessionLogEntry and the given LogEntry by setting the LogEntry's foreign key sessionLogId to refer to this SessionLogEntry.

Implementation

Future<void> logs(
  _i1.DatabaseSession session,
  SessionLogEntry sessionLogEntry,
  _i2.LogEntry logEntry, {
  _i1.Transaction? transaction,
}) async {
  if (logEntry.id == null) {
    throw ArgumentError.notNull('logEntry.id');
  }
  if (sessionLogEntry.id == null) {
    throw ArgumentError.notNull('sessionLogEntry.id');
  }

  var $logEntry = logEntry.copyWith(sessionLogId: sessionLogEntry.id);
  await session.db.updateRow<_i2.LogEntry>(
    $logEntry,
    columns: [_i2.LogEntry.t.sessionLogId],
    transaction: transaction,
  );
}