kysely
    Preparing search index...

    Interface QueryResult<O>

    interface QueryResult<O> {
        insertId?: bigint;
        numAffectedRows?: bigint;
        numChangedRows?: bigint;
        rows: O[];
    }

    Type Parameters

    • O
    Index

    Properties

    insertId?: bigint

    This is defined for insert queries on dialects that return the auto incrementing primary key from an insert.

    numAffectedRows?: bigint

    This is defined for insert, update, delete and merge queries and contains the number of rows the query inserted/updated/deleted.

    numChangedRows?: bigint

    This is defined for update queries and contains the number of rows the query changed.

    This is optional and only provided in dialects such as MySQL. You would probably use numAffectedRows in most cases.

    rows: O[]

    The rows returned by the query. This is always defined and is empty if the query returned no rows.