
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
dbd.db-alternative
Advanced tools
Note: More database will be added, soon or later.
limit (Default is Infinity) amount of data/row in the Database/Table
(Below is only for SQLite Database)createTable)Note: Promise based database will need Promises to completely executed or return data, Others can be coded normally.
These Databases requires their own Dependency, you can find the npm package above.
More detailed examples can be found in the Examples Folder
Start up
// make sure to install mongoose
const dbdDbAlternative = require("dbd.db-alternative")
const mongoose = require("mongoose")
mongoose.connect(Mongoose URL..., MongooseOptions...)
const MongooseConnection = mongoose.connection
MongooseConnection.on("open", () => {
console.log("Connected to Mongoose Database!")
})
const mongodb = new dbdDbAlternative.mongoose(MongooseModel)
// now you can use `mongodb` like dbd.db functions
MongooseModel
const mongoose = require("mongoose")
const Schema = mongoose.Schema
const mySchema = new Schema(MongooseSchemaDocuments...)
const myModel = mongoose.model("mySchema", mySchema)
// import myModel to be used as MongooseModel
Start up
// make sure to install mysql
const dbdDbAlternative = require("dbd.db-alternative")
const MySql = require("mysql")
// This example is to connect to Localhost mysql
// But you can use other Hosting Provider
// As MySQL Database
const MySqlConnection = MySql.createConnection({
host:"localhost",
user:"root",
database:"mydatabase"
})
MySqlConnection.connect()
const mysql = new dbdDbAlternative.mysql(MySqlConnection)
// Create Tables
const table = mysql.createTable("myTable", `
username TEXT,
id INTEGER PRIMARY KEY
`)
// Schema Column types can be found in https://www.sqlite.org/datatype3.html
// Use Tables
mysql.useTable("myTable")
.then(table => {
//do something with `table`
})
.catch(error) => {
//do something with `error`
}
Start up
// make sure to install better-sqlite3
const dbdDbAlternative = require("dbd.db-alternative")
const betterSqlite3 = new dbdDbAlternative.betterSqlite3("database.sqlite"[, better-sqlite3 options])
// WARNING, DO NOT USE FORMATS THAT ARE GLOBAL KNOWN/USED FOR PROGRAMMING, USE CUSTOM FORMATS.
//Creating and Using Table (createTable and useTable) is the same with `createTable`
const table = betterSqlite3.createTable("myTable", `
username TEXT,
id INTEGER PRIMARY KEY
`)
// Schema Column types can be found in https://www.sqlite.org/datatype3.html
// do something with `table`
See Mit License or License File for License.
Copyright 2021 DBD.JS Team
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Allows users to use dbd.db functions with Known/Custom Databases
The npm package dbd.db-alternative receives a total of 0 weekly downloads. As such, dbd.db-alternative popularity was classified as not popular.
We found that dbd.db-alternative 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
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.