insert method
Implementation
Future<int> insert(
Session session,
/* R | List<R> */ items, {
List<Object>? Function(C columns)? columns,
bool? upsert,
bool? onConflictDoNothing,
}) async {
final query = doInsert(
table: this,
rows: (items is Iterable ? items : [items])
.map((e) => e is R ? e.toColumnMap() : e),
columns:
(columns == null ? null : columns(this.columns)) ?? this.columns.$all,
keyColumns: this.columns.$pks,
upsert: upsert,
onConflictDoNothing: onConflictDoNothing,
);
final rs = await session.executeQuery(query);
return rs.affectedRows;
}