New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

planetscale-node

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

planetscale-node - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

LICENSE

3

dist/index.d.ts

@@ -12,4 +12,7 @@ export declare class PSDB {

query(data: any, params: any): Promise<any>;
execute(sql: string, values: any | any[] | {
[param: string]: any;
}): Promise<any>;
private createConnection;
private getCSR;
}

@@ -25,2 +25,8 @@ "use strict";

}
async execute(sql, values) {
if (!this._connection) {
this._connection = await this.createConnection();
}
return this._connection.promise().execute(sql, values);
}
async createConnection() {

@@ -27,0 +33,0 @@ const keys = forge.pki.rsa.generateKeyPair(2048);

2

package.json
{
"name": "planetscale-node",
"version": "0.0.2",
"version": "0.1.0",
"description": "PlanetScale Database Client",

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

# planetscale-node
This is a very basic (v0.0.1) JavaScript client for connecting to PlanetScale.
This is a pre-release JavaScript client for connecting to PlanetScale.

@@ -39,3 +39,3 @@ ## Installation

```javascript
const {PDSB} = require('planetscale-node')
const { PDSB } = require('planetscale-node')

@@ -50,1 +50,15 @@ async function main() {

```
### Using prepared statements
```javascript
const { PDSB } = require('planetscale-node')
async function main() {
const conn = new PSDB('main')
const [rows, fields] = await conn.execute('select * from reminders where id > ?', [10])
console.log(rows, fields)
}
main()
```
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