© 2026 Hedgehog Software, LLC
HttpApiBuilder.toWebHandler()
const paginate = Effect.fn("VendorsRepository.paginate")(function* ( paginationInput: typeof PaginationInput.Type ) { const pagination = getPagination(paginationInput); const [data, total] = yield* Effect.all([ db .select() .from(vendors) .offset(pagination.offset) .limit(pagination.limit), db.select({ count: count() }).from(vendors), ]).pipe(Effect.catchAll((e) => Effect.die(e))); return getPaginationOutput({ data, total }, pagination); });