![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.
Automation of database scripts: turning results to jq to simply scripting for support and diagnostics
Automation of database scripts: turning results to jq to simply scripting for support and diagnostics
We have a command line tool db-auto
that 'knows' a little about the database structure. This knowledge is
in a file called db-auto.json
. This file is in the current directory or a parent.
The tool just does simple queries that joins tables together. It is intended for support people that need to walk tables. Often these people often have a notepad full of common queries that they copy and paste into the database tool. This tool is intended to subliment that, and make it easy to do the same thing from the command line.
db-auto ? # lists the tables
db-auto d? # lists the tables that start with d
db-auto driver 123 # lists the driver with id 123
db-auto driver --name phil # lists the driver with name phil
db-auto driver.audit 123 # lists the audit records for driver 123 (the records for driver are joined to the audit records)
db-auto driver.mission.audit 123 # lists the audit records for the missions that driver 123 has been on
db-auto driver.mission.audit 123 -date '2023-6-3' # lists the audit records for the missions that driver 123 has been on for the given date
The sql queries are derived from a knowledge of the database that is in the db-auto.json
file. Currently,
this has to be populated manually, but I expect to auto generate it from the database schema.
Show the sql instead of executing it
Execute the command one step at a time, showing the sql and the results
db-auto driver.mission.audit 123 -ts
Add a where clause to the query. Typically you would do a -s
first to find the alias name
db-auto driver.mission.audit -w 'audit.id = 123'
db-auto driver -w 'T0.name = "phil"' # Note the need for the quotes. This is because the shell is parsing the command line
Typicaly, we have multiple environments. The tool can be configured to use different databases for different environments:
this is in the db-auto.json
file. The default environment is dev
(and in current state that's the only one usable)
The environment gives the database type and the connection details
The username and password don't need to be specified if they are in environment variables:
export DB_AUTO_DEV_USERNAME=phil
export DB_AUTO_DEV_PASSWORD=phil
FAQs
Unknown package
The npm package db-auto receives a total of 0 weekly downloads. As such, db-auto popularity was classified as not popular.
We found that db-auto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.