Found 5 repositories(showing 5)
BarmanCapital
Ugly Panda is a learn-to-earn TMA for learning English, designed for the vast audience of over 1.5 billion potential Web3 users in the Chinese-speaking regions. Join the Telegram channel to learn Web3 English : https://t.me/Web3DailyEnglish
Selbahc
Mini site d'entrainement. Images et agencement imposรฉ.
vk-auw628
No description available
S-M-J-I
A short and simple (and ugly) demo of using pygame, matplotlib, and pandas.
716716
Skip to content Learn Git and GitHub without any code! Using the Hello World guide, youโll start a branch, write comments, and open a pull request. fadhilsaheer / mongoi Code Issues Pull requests Actions Projects Wiki Security Insights mongoi/readme.md @fadhilsaheer fadhilsaheer added redame 1 contributor 226 lines (143 sloc) 3.64 KB MONGOI๐ MONGOI is a npm package made by Fadhil easy tool to manage and do CRUD operation with mongo database Setup Requirements Node Js Npm Mongo Db Internet [to download] ๐ npm i mongoi This will install mongoi for you ๐ How To Use Mongoi will help you to do crud operation ๐ฑ to have more features don't forget to contribute ๐ After installing require it const mongoi = require('mongoi') you have initialize it first let yourDatabaseConnectionUrl = "mongdb:localhost:27017" // create database schema as you do for mongoose let databaseSchema = { name: String, } let collectionName = "your-collection-name" mongoi.init(yourDatabaseConnectionUrl, databaseSchema, collectionName).then(()=>{ // you can write anything here except bug ๐ }) now you initialized mongoi successfully ๐ so lets start doing crud ๐ CRUD = CREATE - READ - UPDATE - DELETE // This is the model of crud ๐ช mongoi.crud([option], data).then(()=>{ // use it ๐ }) // options // [you have to write it in string eg : "r"] // // s - "save" // r = "read" // ro = "read one" // u = "update many" // uo = "update one" // d = "delete all" // do = "delete one" // dm = "delete many" // // Enjoy ๐ค // Create lets create ๐ป // create this according to you schema const data_to_save = { name: "apple", color: "red" } mongoi.crud("s". data_to_save) // you can call .then after this ๐ฅฑ Read lets read ๐ // read all mongoi.crud("r").then((data_you_get_from_database)=>{ // do with this data ๐ผ }) // read one let condition = {name: "panda"} // this is the condition of what are you looking for mongoi.crud("ro", condition).then((data_you_get_from_database)=>{ // do with this data ๐ง }) Update let update ๐ // update many or update all let condition_and_data = [ {cute_message: "you are ugly ๐คฎ"},//this should be condition {cute_message: "you are cute ๐"}//thing you wan't to change ] mongoi.crud("u", condition_and_data)// you can call .then after this ๐ฅฑ i don't care ๐ // ๐ /* let condition_and_data = [ {cute_message: "you are cute ๐"},//you are not cute ๐ {cute_message: "you are ugly ๐คฎ"}//you are ugly ๐ ] mongoi.crud("u", condition_and_data)// just kidding ๐ */ // update one let condition_and_data = [ {cute_message: "you are ugly ๐คฎ"},//this should be condition {cute_message: "you are cute ๐"}//thing you wan't to change ] mongoi.crud("uo", condition_and_data)// you can call .then after this ๐ฅฑ i don't care ๐ // ๐ /* let condition_and_data = [ {cute_message: "you are cute ๐"},//you are not cute ๐ {cute_message: "you are ugly ๐คฎ"}//you are ugly ๐ ] mongoi.crud("u", condition_and_data)// just kidding ๐ Delete lets delete this ๐งบ // delete all mongoi.crud("d") // .then is supported ๐ // delete many let condition = {cute_message: "you are cute"} mongoi.crud("dm", condition)// use .then if you want // delete one let condition = {cute_message: "you are cute"} mongoi.crud("do", condition)// use .then if you want no one cares ๐ Conclusion Hopefully I assume that you love ๐ this contribute for updating this garbage ๐ Made With ๐ Fadhil ยฉ 2021 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About
All 5 repositories loaded