github drizzle-team/drizzle-orm 0.30.10

latest releases: 0.36.1, drizzle-kit@0.28.0, drizzle-kit@0.27.2...
6 months ago

New Features

🎉 .if() function added to all WHERE expressions

Select all users after cursors if a cursor value was provided

async function someFunction(categories: string[] = [], views = 0) {
  await db
    .select()
    .from(users)
    .where(
       and(
          gt(posts.views, views).if(views > 100),
          inArray(posts.category, categories).if(categories.length > 0),
       ),
    );
}

Bug Fixes

  • Fixed internal mappings for sessions .all, .values, .execute functions in AWS DataAPI

Don't miss a new drizzle-orm release

NewReleases is sending notifications on new releases.