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

nukak

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nukak - npm Package Compare versions

Comparing version 0.2.24 to 0.2.25

4

package.json

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "0.2.24",
"version": "0.2.25",
"type": "module",

@@ -37,3 +37,3 @@ "main": "./index.js",

"rimraf": "^5.0.1",
"typescript": "^5.1.3",
"typescript": "^5.1.5",
"uuid": "^9.0.0"

@@ -40,0 +40,0 @@ },

@@ -66,25 +66,4 @@ <!-- ![code](/assets/code.webp 'code') -->

## Configure
---
A default querier-pool can be set in any of the bootstrap files of your app (e.g. in the `server.ts`).
```ts
import { setQuerierPool } from 'nukak';
import { PgQuerierPool } from 'nukak-postgres';
export const querierPool = new PgQuerierPool(
{
host: 'localhost',
user: 'theUser',
password: 'thePassword',
database: 'theDatabase',
},
// optionally, a logger can be passed to log the generated SQL queries
{ logger: console.log }
);
// the default querier pool that `nukak` will use
setQuerierPool(querierPool);
```
&nbsp;

@@ -131,2 +110,27 @@

## Setup a default querier-pool
A default querier-pool can be set in any of the bootstrap files of your app (e.g. in the `server.ts`).
```ts
import { setQuerierPool } from 'nukak';
import { PgQuerierPool } from 'nukak-postgres';
export const querierPool = new PgQuerierPool(
{
host: 'localhost',
user: 'theUser',
password: 'thePassword',
database: 'theDatabase',
},
// optionally, a logger can be passed to log the generated SQL queries
{ logger: console.log }
);
// the default querier pool that `nukak` will use
setQuerierPool(querierPool);
```
&nbsp;
## Manipulate the data

@@ -138,3 +142,3 @@

async function findLastUsers(limit = 10) {
async function findFirstUsers(limit = 100) {
const querier = await getQuerier();

@@ -144,3 +148,3 @@ const users = await querier.findMany(

{
$sort: { createdAt: -1 },
$sort: { createdAt: 1 },
$limit: limit,

@@ -147,0 +151,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