A simple, fast, reliable Object Relationship Manager for Bun.

Overview

Burm

GitHub code size in bytes GitHub issues GitHub Repo stars GitHub followers GitHub Sponsors GitHub top language Discord

Burm is an object relational manager for Bun, the fastest Javascript Engine. The name is a merge of "Bun" and "ORM", forming "Burm". Pronounce it however you would like, we really don't care. Also, the project is licensed under the MIT license and managed by the Fairfield Programming Association. This means you can do whatever you want with it while still knowing it's not going anywhere.

Getting Started

To install Bun, run the following code. From there, you can create your own bun project and use Bun or NPM as your package manager.

curl https://bun.sh/install | bash

To download the project from NPM, just use the command below. This will include burm as one of your dependencies (Just a side note, burm doesn't depend on any other packages, because we're just that cool).

npm i burm

Below is some starter code that you can use to get burm included in your project. Burm allows for models to be created at runtime, procedural data generation for testing, and many other cool things you can check out in our documentation.

Without Types

const User = Burm.register("User", {
  firstname: DataType.STRING,
  lastname: DataType.STRING
})

const aData = User.create({
  firstname: "William",
  lastname: "McGonagle"
})

const bData = User.findOne({
  where: Condition.equals(
    "firstname",
    "William"
  )
})

With Types

interface UserModel {
  firstname: string;
  lastname: string;
}

const User = Burm.register<UserModel>("User", {
  firstname: DataType.STRING,
  lastname: DataType.STRING
})

const aData = User.create({
  firstname: "William",
  lastname: "McGonagle"
})

const bData = User.findOne({
  where: Condition.equals(
    "firstname",
    "William"
  )
})

Features

Below is a list of features that Burm either currently has or will need in the not-too-distant future. These features are for user-happiness, performance, or long term benefit of the community.

  • Defining Models and Doing CRUD Operations
  • Creating Relationships Between Tables
  • Middleware System (Similar to Express)
  • High Code Coverage
  • 100% Typescript Definitions for Typechecking
  • Ability to Run Raw Queries
  • Promises/ Async Await
  • Query Pagination

Agenda and Plan

We want Burm to be the go-to ORM for Bun, but how are we going to do that? Well, let's start by laying out what the agenda is below.

  1. Build a modular skeleton of an ORM. This will allow basic CRUD, Middleware, Caching, and some other features.
  2. Create database wrappers
    • SQLite
    • postgreSQL
    • SQL
  3. Create database packages
    • There is no point in having database wrappers (which are used to generate the queries), if you do not have packages to actually connect to the database and run the queries. That is why for each database wrapper, we will also need a database package.

If you have any pieces that you would like to add to this (very rough) agenda, just put them in a Github issue and send it in. Other people will be able to see it, and hopefully work on the idea.

Also not included in this agenda is a documentation website and landing page. Since it's supported by the Fairfield Programming Association, we are able to host it on the FPA servers and use the FPA domain.

Comments
  • Code-style rules

    Code-style rules

    👋🏼

    I think it would be a good idea to have a prettier config or something similiar setup so that everyone who works on the codebase has the same style guides applied to it.

    opened by fabil7h 3
  • Guideline for New Contributors

    Guideline for New Contributors

    The project is ❤️ interesting, I like to contribute however I am 🆕 to open source contribution but not to programming.

    It will be helpful if you can add code contribution guidelines or point to some samples to give head start to first timers.

    Thanks 👍🏽

    PS: I saw so many beautiful software which does not reach the limelight because of lack of use cases and good documentation. The Bun seems amazing and the performance statistics on the Bun.sh are awesome 👀

    opened by fawad-sh 2
  • Code quality update

    Code quality update

    In this update I refactored some code. I separated all types, interfaces and enums into a separate directory. This way we can ensure a fixed location is given. On top the refactoring also includes the new prettier config being applied.

    In addition to that think that a best practise would be to call types and interfaces for example as "ConditionProps". This really implies what the return type would be and is a lot more meaningful.

    opened by fabil7h 1
  • Create a basic foundation

    Create a basic foundation

    First, the project needs a basic foundation with a simple way for the user to interact. I'm thinking it should be based off of Sequelize because of how popular it is. I'm not a huge fan of the Class API that Sequelize has, so I'm going to base it off of the 'registering functions API'.

    enhancement help wanted good first issue 
    opened by William-McGonagle 1
  • Set up automatic deploy to NPM?

    Set up automatic deploy to NPM?

    Would it be helpful if I setup automatic deploy through our Continuous Integration and Deployment system? Let me know if anyone wants this feature or if it would just be stupid.

    good first issue question 
    opened by William-McGonagle 1
  • Create CI/CD to build and deploy to NPM automatically

    Create CI/CD to build and deploy to NPM automatically

    I think it would be really awesome if we could set up an automatic build system so that after every commit, it automatically pushes the code to NPM. The NPM version could just automatically increment as bug fixes in the semantic versioning.

    enhancement help wanted good first issue 
    opened by William-McGonagle 0
  • EASY: Add property names to the Model object

    EASY: Add property names to the Model object

    Currently, in the model object schema, there are some properties like hasParameter (function), name (string), and parameters (object). I think it would be cool that in the file where we create the model object, we also add in the columns that the user defined for the model.

    You might be wondering what the use case for this would be, but it would be mainly used for what I'm going to show below. Using this below could make the code much more readable and simple to understand, but in the end, User.id would also have the value of "id", so the two would be identical in function.

    const userData = User.findOne({
        where: Condition.Equals("id", 1)
    })
    

    Turns into

    const userData = User.findOne({
        where: Condition.Equals(User.id, 1)
    })
    
    enhancement help wanted good first issue 
    opened by William-McGonagle 2
Owner
William McGonagle
I am a developer that jumps from project to project- I know about 20 different programming languages, and I am a huge fan of the open-source initiative.
William McGonagle
Object Relational Mapping

Object Relational Mapping This package is not actively maintained If you're starting a new project, please consider using one of the following instead

Diogo Resende 3.1k Dec 14, 2022
In-memory Object Database

limeDB What is LimeDB LimeDB is object-oriented NoSQL database (OOD) system that can work with complex data objects that is, objects that mirror those

Luks 2 Aug 18, 2022
Modular Redis connection and PUBSUB subscription manager for node. Easily extendable. Built for performance, powered by ioredis.

RediBox Redis connection and PUBSUB subscription manager for node. Built for performance, powered by ioredis (for now). Maintained by TeamFA. What is

RediBox 83 Dec 15, 2022
Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application

Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application

DbGate 2k Dec 30, 2022
The nestjs cache module based on cache-manager & decorators 🍃

A progressive Node.js framework for building efficient and scalable server-side applications. zirus-cache zirus-cache for Nest.JS - simple and modern

Yakov Bobroff 4 May 9, 2022
Lovefield is a relational database for web apps. Written in JavaScript, works cross-browser. Provides SQL-like APIs that are fast, safe, and easy to use.

Lovefield Lovefield is a relational database written in pure JavaScript. It provides SQL-like syntax and works cross-browser (currently supporting Chr

Google 6.8k Jan 3, 2023
Fast and advanced, document based and key-value based NoSQL database that able to work as it is installed.

About Fast and advanced, document based and key-value based NoSQL database that able to work as it is installed. Features NoSQL database Can be run as

null 6 Dec 7, 2022
Thin Backend is a Blazing Fast, Universal Web App Backend for Making Realtime Single Page Apps

Website | Documentation About Thin Thin Backend is a blazing fast, universal web app backend for making realtime single page apps. Instead of manually

digitally induced GmbH 1.1k Dec 25, 2022
Database in JSON, fast and optimize

?? Database-Dev ?? DevNetwork#2103 ?? V 1.0.0 ?? Dependence Libs use ?? NodeJs V 16.14.2 (NodeJs) ?? fs (nodeFS) ?? Use libs import the file in your p

DevNetwork™️ 3 Apr 21, 2022
Fast and advanced, document-based and key-value-based NoSQL database.

Contents About Features Installation Links About Fast and advanced, document-based and key-value-based NoSQL database. Features NoSQL database Can be

null 6 Dec 7, 2022
A fast, synchronized and dynamic query builder package.

@ssibrahimbas/query A fast, synchronized and dynamic query builder package. What is? In short, the query builder. You can write complex and parameteri

Sami Salih İbrahimbaş 7 Jun 13, 2022
Fast File is a quick and easy-to-use library to convert data sources to a variety of options.

Fast File Converter The Express.js's Fast File Converter Library Fast File Converter Library is a quick and easy-to-use library to convert data source

Ali Amjad 25 Nov 16, 2022
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js

bookshelf.js Bookshelf is a JavaScript ORM for Node.js, built on the Knex SQL query builder. It features both Promise-based and traditional callback i

Bookshelf.js 6.3k Jan 2, 2023
Simple key-value storage with support for multiple backends

Simple key-value storage with support for multiple backends Keyv provides a consistent interface for key-value storage across multiple backends via st

Luke Childs 2k Jan 7, 2023
A simple url shorter API built with nodejs running on Kubernetes in Google Cloud, using PostgreSQL for storage and cloud sql proxy.

Simple URL Shorter - Google Cloud - Kubernetes A simple url shorter API built with nodejs running on Kubernetes in Google Cloud, using PostgreSQL for

null 3 Nov 25, 2021
This is very simple game catch word with JavaScript and Jquery

Catch-Word-js This is very simple game catch word with JavaScript and Jquery install and run guide! download project zip! extract zip file on any dire

Jortsoft 14 Nov 26, 2022
This is a repository that contains an simple NestJS API about Movies developed at Blue EdTech.

NestJS Movies Technologies and requirements NestJS JavaScript TypeScript Prisma MySQL Project This is a repository that contains an simple NestJS API

Isabella Nunes 2 Sep 28, 2021
curl for GraphQL with autocomplete, subscriptions and GraphiQL. Also a dead-simple universal javascript GraphQL client.

graphqurl graphqurl is a curl like CLI for GraphQL. It's features include: CLI for making GraphQL queries. It also provisions queries with autocomplet

Hasura 3.2k Jan 3, 2023
Use Pinata (IPFS) as a simple datastore

?? Pinatastore A simple module to store and retrieve simple JSON data from a decentralized databse. (Pinata IPFS) Pinatastore uses a structure similar

Navindu Amarakoon 3 Jan 10, 2022