Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Releases: Marco5dev/jsonverse

deprecated1

24 Mar 04:02
0745236
Compare
Choose a tag to compare

v1.3.4 deprecated is now verse.db

24 Mar 03:53
c3bd4da
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.3.3...deprecated

deprecated is now

verse.db package

npm i verse.db

docs: https://versedb.jedi-studio.com

jsonVerse v1.3.3

02 Oct 12:46
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.3.2...1.3.3

v1.3.2

27 Sep 12:13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.3.1...v1.3.2

v1.3.1

18 Sep 21:48
Compare
Choose a tag to compare

What Changed ?

  • Merge Schema to Beta version
    • because of some big error need time to be fixed & we need help, I need help to fix it

Sorry but it will take some time

Full Changelog: v1.3.0...v1.3.1

Beta

18 Sep 23:19
d8ae419
Compare
Choose a tag to compare
Beta Pre-release
Pre-release

New Beta Version Beta-Schema

I tested the Schema and i found a lot of Errors,

And i decided to fix it but it was so big that may take so much time,

So i removed it in the new Version and it will back after fixing it.

you can help me Fixing it in by cloning it with the next commend

git clone -b Beta https://github.com/Marco5dev/jsonverse.git

or

Go to https://github.com/Marco5dev/jsonverse/releases/tag/beta and install Beta file with the extension like .zip or .tar.gz

v1.3.0

17 Sep 11:41
Compare
Choose a tag to compare

What Changed ?

  • #24 Improving the functions with promises
  • #23 Add Database Schema
  • Create new documentation Link https://marco5dev.github.io/jsonverse-documentation/
  • Update some functions name to use with the Schema like now you can use .Save, .delete, .update, and .find example bellow
const Jsonverse = require("jsonverse");
const db = new Jsonverse();

const { Schema } = Jsonverse;

const userSchema = new Schema({
  name: {
    type: String,
    required: true,
  },
  age: {
    type: Number,
    required: true,
  },
  email: {
    type: String,
    required: true,
    unique: true,
  },
});

module.exports = db.model("User", userSchema);
// Create a new user

const User = require("./path/to/UserSchema.js"); // Import the schema 

const newUser = {
  id: "123", // there is an auto id generator don't worry this is an example // or you can set a custom id by setting that id: what you want
  name: "John Doe",
  age: 30,
  email: "[email protected]",
}; // example data to save but we use json normally

// Save the new user
User()
  .save(newUser)
  .then(() => {
    console.log("User saved successfully");
  })
  .catch((error) => {
    console.error(error);
  });

// Delete a user by query
const deleteQuery = { id: "123" };
User()
  .delete(deleteQuery)
  .then(() => {
    console.log("User deleted successfully");
  })
  .catch((error) => {
    console.error(error);
  });

// Update a user by query
const updateQuery = { id: "123" }; // not only the id you use the name or any query like { name: ''John Doe }
const updates = { age: 31 }; // the data you want to update
User()
  .update(updateQuery, updates)
  .then(() => {
    console.log("User updated successfully");
  })
  .catch((error) => {
    console.error(error);
  });

// Find users by query
const findQuery = { age: { $gte: 30 } };
// $gte: This operator stands for "greater than or equal to."
// It is used to filter documents where the specified field's value is greater than or equal to the specified value
User()
  .find(findQuery)
  .then((users) => {
    console.log("Users found:", users);
  })
  .catch((error) => {
    console.error(error);
  });

Full Changelog: v1.2.7...v1.3.0

v1.2.7

10 Sep 09:57
Compare
Choose a tag to compare

What Changed ?

  • Fix a bug in saveData

Full Changelog: v1.2.6...v1.2.7

v1.2.6

09 Sep 23:15
Compare
Choose a tag to compare

What changed ?

  • Fix a bug in saveData

The bug:

  • the saveData function dublicate the old saved data with the new data

Full Changelog: v1.2.5...v1.2.6

v1.2.5