Inserts one or multiple relations in the database.
Method Syntax
await db.InsertRelation<T>(table, data)Arguments
Arguments | Description |
|---|---|
table | Optionally pass along a table to insert into. |
data | Either a single document/record or an array of documents/records to insert |
cancellationToken | The cancellationToken enables graceful cancellation of asynchronous operations. |
Example usage
await db.InsertRelation(
new WroteRelation
{
In = ("user", "u1"),
Out = ("post", "p1"),
CreatedAt = now,
NumberOfPages = 144
}
);