Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@knorm/postgres
Advanced tools
Postgres plugin for @knorm/knorm that enables running queries agaisnt postgres. Also, it adds postgres-specific features such as:
json
and jsonb
fields before save (insert or update)string
fields with maxLength: 255
limit
, offset
, returning
query options and ilike
where option,
via sql-bricks-postgresUPDATE FROM
, via
sql-bricks-postgresnpm install --save @knorm/knorm @knorm/postgres
@knorm/postgres has a peer dependency on @knorm/knorm
const knorm = require('@knorm/knorm');
const knormPostgres = require('@knorm/postgres');
const orm = knorm({
// knorm options
}).use(
knormPostgres({
// knormPostgres options
})
);
Option | Type | Description |
---|---|---|
name | string | the name of the plugin, defaults to 'postgres' |
connection | object or string | if set, this option is passed directly to pg. However, connections can also be configured via environment variables |
initClient | (async) function | a function called when a new client is acquired from the pool. useful for configuring the connection e.g. setting session variables. it's called with the client as the only argument |
restoreClient | (async) function | a function called before a client is released back into the pool. useful for restoring a client e.g. unsetting session variables. it's called with the client as the only argument |
NOTE that all options are optional.
FAQs
Postgres plugin for knorm
The npm package @knorm/postgres receives a total of 1,276 weekly downloads. As such, @knorm/postgres popularity was classified as popular.
We found that @knorm/postgres demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.