🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

sqlmongoose

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sqlmongoose

Mongoose-like schemas and models for SQLite3

latest
Source
npmnpm
Version
6.1.0
Version published
Maintainers
1
Created
Source

SQLMongoose

npm version npm downloads License

SQLMongoose is a powerful, modern, and easy-to-use ORM for SQLite3, inspired by Mongoose. It's designed to be intuitive for beginners and powerful for advanced users. It provides a simple and elegant way to interact with your SQLite database.

Features

  • Easy to use: A simple and intuitive API that feels familiar.
  • Powerful Query Builder: Chainable query builder for complex queries.
  • Schema Validation: Define schemas for your models and validate your data.
  • Hooks: Execute middleware functions before or after operations.
  • TypeScript Support: First-class TypeScript support out of the box.

Installation

npm install sqlmongoose

Quick Start

Here's a quick example to get you started:

import { sqlmongoose, Schema, DataTypes } from 'sqlmongoose';

// 1. Connect to the database
await sqlmongoose.connect(':memory:');

// 2. Define a schema
const userSchema = new Schema({
  name: { type: DataTypes.STRING, required: true },
  email: { type: DataTypes.STRING, unique: true },
  age: { type: DataTypes.NUMBER, default: 0 },
});

// 3. Define a model
const User = sqlmongoose.define('User', userSchema);

// 4. Create a new user
const user = await User.create({
  name: 'John Doe',
  email: 'john.doe@example.com',
  age: 30,
});

console.log('User created:', user);

// 5. Find users
const users = await User.find().where('age', '>', 25).execute();

console.log('Users older than 25:', users);

Documentation

For more detailed information and advanced usage, please check out the documentation.

Examples

You can find more examples in the examples directory.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Keywords

sqlite

FAQs

Package last updated on 03 Aug 2025

Did you know?

Socket

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.

Install

Related posts