mapToSqlVariable method

  1. @override
int? mapToSqlVariable(
  1. DateTime? content
)
override

Maps the content to a value that we can send together with a prepared statement to represent the given value.

Implementation

@override
int? mapToSqlVariable(DateTime? content) {
  // ignore: avoid_returning_null
  if (content == null) return null;

  return content.millisecondsSinceEpoch ~/ 1000;
}