#Order by `rowid`?

2 messages · Page 1 of 1 (latest)

tacit rain
#

Is it possible to order by (SQLite) rowid?

I need to order by rowid as my table has no other natural sorting column.

    const driverFamilyRelationships = await c.var.f1db.driverFamilyRelationship.findMany({
      where: {
        AND: [{ driverId: driverId }, pageableQueryOptions.where],
      },
      orderBy: [
        // TODO: { _raw: Prisma.sql`rowid` },
        ...pageableQueryOptions.orderBy,
      ],
      skip: pageableQueryOptions.skip,
      take: pageableQueryOptions.take,
    });
lilac phoenixBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution