npm drizzle-orm 0.30.10

latest releases: 0.34.0-ff1e9a5, 0.34.0-8dece56, 0.34.0-f026b0e...
4 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.