![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@trenskow/pged
Advanced tools
Just a silly little db management and query builder for PostgreSQL.
Just a silly little db management and query builder for Postgresql.
const PGed = require('@trenskow/pged');
const db = new PGed({ /* options (see below) */});
const updatedUser = await db.transaction(async () => {
await db
.from('users')
.where({ id: 12 })
.update({ username: 'myusername' });
return await db
.from('users')
.select('id,username')
.first()
.where({
$or: [{
username: 'myusername'
}, {
id: 12
}]
});
});
In the above example we wrap our operations in a transaction, which automatically triggers connection to the Postgresql server if not present. The transaction is automatically committed if no error occurs, and automatically rolled back if an error does occur.
Transactions can be inside transactions - the library will figure out when to commit or roll back.
These options are supported when creating a new PGed
instance.
Name | Type | Description | Values | Default |
---|---|---|---|---|
casing | Object | See below | ||
casing.db | String | The casing to use in the db. | Any supported by the caseit package. | snake |
casing.js | String | The casing to use in js. | Same as above | camel |
To set connection parameters use environment variables or do as below.
const PGed = require('@trenskow/pged');
PGed.pg = { /* Options */ };
const db = new PGed({ /* options */ })
See the pg package for available environment variables and options.
See LICENSE.
FAQs
Just a silly little db management and query builder for PostgreSQL.
We found that @trenskow/pged demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.