> Full Neon documentation index: https://neon.com/docs/llms.txt
> IMPORTANT: If this page contains inaccurate or outdated information, report it: POST to https://neon.com/api/docs-feedback with {"feedback": "describe the issue", "path": "/changelog/2023-08-16"}

### Neon serverless driver enhancements

The [Neon serverless driver](https://neon.com/docs/serverless/serverless-driver) is a low-latency Postgres driver for JavaScript and TypeScript that allows you to query data from serverless and edge environments over HTTP or WebSockets in place of TCP.

The driver now supports batched queries and a larger response size for queries over HTTP.

#### Batched queries

You can now issue multiple queries at once in a single, non-interactive transaction using the `transaction()` function, which is exposed as property of the query function. For example:

```javascript
import { neon } from '@neondatabase/serverless';
const sql = neon(process.env.DATABASE_URL);
const showLatestN = 10;

const [posts, tags] = await sql.transaction([
  sql`SELECT * FROM posts ORDER BY posted_at DESC LIMIT ${showLatestN}`,
  sql`SELECT * FROM tags`,
]);
```

The `transaction()` function supports the same option keys the ordinary query function: `arrayMode`, `fullResults`, and `fetchOptions`, plus three additional keys for transaction configuration:

- `isolationMode`

  Must be one of `ReadUncommitted`, `ReadCommitted`, `RepeatableRead`, or `Serializable`.

- `readOnly`

  Ensures that a `READ ONLY` transaction is used to execute queries. The default value is `false`.

- `deferrable`

  Ensures that a `DEFERRABLE` transaction is used to execute queries. The default value is `false`.

For more information, see [transaction(...) function](https://github.com/neondatabase/serverless/blob/main/CONFIG.md#transaction-function).

#### Larger response sizes

The maximum response size for queries over HTTP was raised from 1 MB to 10 MB.
