Registry / database / caminte

caminte

JSON →
library0.4.1jsnpmunverified

CaminteJS is a cross-database ORM for Node.js (v0.4.1, no recent releases) that provides a unified interface to interact with multiple databases including MySQL, PostgreSQL, SQLite, MongoDB, Redis, Neo4j, CouchDB, RethinkDB, and more. It features a model-driven approach with support for relationships, validations, query building, hooks, and a CLI for scaffolding. Unlike ORMs like Sequelize or Mongoose that are tied to specific databases, CaminteJS offers flexibility to switch backends with minimal code changes, though its last update was in 2017 and it relies on separate adapter packages which may be unmaintained.

npm install caminte
INSTALL
IMPORT
SIG · CAMINTE
C
caminte
databasejavascriptv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Schema
✓ import { Schema } from 'caminte';
✗ const caminte = require('caminte'); const Schema = caminte.Schema;
Import Schema from caminte; older docs might show require, but ESM is supported in Node >=4.
Text
✓ import { Schema, Text } from 'caminte';
✗ import { Text } from 'caminte'; (Text is not directly exported)
Text is a type helper; use Schema.Text or import via destructuring from Schema.
DataType
✓ import { Schema } from 'caminte'; var DataType = Schema.DataType;
✗ import { DataType } from 'caminte';
Data types are nested under Schema, not top-level exports.

Initializes a schema with MySQL, defines a Post model with various types, creates a record, and logs the result.

import { Schema } from 'caminte'; const schema = new Schema('mysql', { host: process.env.DB_HOST ?? 'localhost', port: process.env.DB_PORT ?? 3306, database: process.env.DB_NAME ?? 'test', username: process.env.DB_USER ?? 'root', password: process.env.DB_PASS ?? '', }); const Post = schema.define('Post', { title: { type: String, length: 255 }, content: { type: Schema.Text }, date: { type: Date }, published: { type: Boolean, default: false }, }); Post.create({ title: 'Hello Caminte', content: 'Test', published: true }, (err, post) => { if (err) return console.error(err); console.log('Created:', post.id); });
Debug
Known issues
deprecatedThe package caminte is no longer actively maintained and may have security vulnerabilities in its dependencies.
fix
Consider migrating to a more modern ORM like Sequelize or Prisma that are actively maintained.
affects: >=0
breakingAdapter packages like caminte-mysql, caminte-postgres must be installed separately and may be incompatible with newer Node versions.
fix
Install the adapter for your database, e.g., npm install caminte-mysql.
affects: >=0.3
gotchaCaminteJS uses callbacks, not Promises, which can lead to callback hell if not managed carefully.
fix
Wrap calls in Promises manually or use a library like 'promise' to convert callback-based functions.
affects: >=0
Errors
Common errors & fixes
Error: Cannot find module 'caminte-mysql'
Missing adapter package; caminte does not bundle database adapters.
fix
Run: npm install caminte-mysql (or caminte-postgres, caminte-mongodb, etc.)
TypeError: schema.define is not a function
Using caminte < 0.3 API; schema.define was introduced in 0.3.
fix
Upgrade caminte to at least 0.3.0 and ensure correct import.
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server
MySQL 8.0 default auth plugin 'caching_sha2_password' not supported by caminte's mysql adapter.
fix
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Upgrade
Version history
0.4.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
caminte — npm install caminte · libregistry