Inserts a row built from a plain object, routed to key's shard.
key
Type of returned rows when RETURNING is used
RETURNING
Primary key used for shard routing
Target table name
Column to value map for the new row
Insert modifiers (orReplace/orIgnore, returning)
orReplace
orIgnore
returning
The write result
1.2.4
await insertInto('user-123', 'users', { id: 'user-123', username: 'ada', created_at: Math.floor(Date.now() / 1000)}); Copy
await insertInto('user-123', 'users', { id: 'user-123', username: 'ada', created_at: Math.floor(Date.now() / 1000)});
Inserts a row built from a plain object, routed to
key's shard.