@earth-app/collegedb
    Preparing search index...

    Function insertInto

    • Inserts a row built from a plain object, routed to key's shard.

      Type Parameters

      • T = Record<string, unknown>

        Type of returned rows when RETURNING is used

      Parameters

      • key: string

        Primary key used for shard routing

      • table: string

        Target table name

      • values: ColumnValues

        Column to value map for the new row

      • options: BuildInsertOptions = {}

        Insert modifiers (orReplace/orIgnore, returning)

      Returns Promise<QueryResult<T>>

      The write result

      1.2.4

      await insertInto('user-123', 'users', {
      id: 'user-123',
      username: 'ada',
      created_at: Math.floor(Date.now() / 1000)
      });