Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@planetscale/database

Package Overview
Dependencies
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planetscale/database - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

5

dist/index.js

@@ -86,2 +86,5 @@ import { format } from './sanitization.js';

const fields = result?.fields ?? [];
for (const field of fields) {
field.type || (field.type = 'NULL');
}
const rows = result ? parse(result, this.config.cast || cast, options.as || 'object') : [];

@@ -162,3 +165,3 @@ const headers = fields.map((f) => f.name);

function decodeRow(row) {
const values = atob(row.values);
const values = row.values ? atob(row.values) : '';
let offset = 0;

@@ -165,0 +168,0 @@ return row.lengths.map((size) => {

2

dist/version.d.ts

@@ -1,1 +0,1 @@

export declare const Version = "1.4.0";
export declare const Version = "1.4.1";

@@ -1,1 +0,1 @@

export const Version = '1.4.0';
export const Version = '1.4.1';
{
"name": "@planetscale/database",
"version": "1.4.0",
"version": "1.4.1",
"description": "A Fetch API-compatible PlanetScale database driver",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -156,2 +156,15 @@ # PlanetScale Serverless Driver for JavaScript

### Row return values
Rows can be returned as an object or an array of column values by passing an `as` option to `execute`.
```ts
const query = 'select 1 as one, 2 as two where 1=?'
const objects = conn.execute(query, [1], { as: 'object' })
// objects.rows => [{one: '1', two: '2'}]
const arrays = conn.execute(query, [1], { as: 'array' })
// arrays.rows => [['1', '2']]
```
## Development

@@ -158,0 +171,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc