{"id":22239621,"url":"https://github.com/nodeclient/mira-db2","last_synced_at":"2025-10-14T15:41:24.771Z","repository":{"id":143940442,"uuid":"435625310","full_name":"Nodeclient/mira-db2","owner":"Nodeclient","description":"Mira Database v2.0  (2021)","archived":false,"fork":false,"pushed_at":"2021-12-07T18:22:23.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T10:15:39.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nodeclient.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-06T19:42:03.000Z","updated_at":"2021-12-07T18:22:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d4f9c3d-48d8-4816-8c86-d7b961ecd576","html_url":"https://github.com/Nodeclient/mira-db2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nodeclient/mira-db2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Fmira-db2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Fmira-db2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Fmira-db2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Fmira-db2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nodeclient","download_url":"https://codeload.github.com/Nodeclient/mira-db2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Fmira-db2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019345,"owners_count":26086711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T03:20:16.920Z","updated_at":"2025-10-14T15:41:24.723Z","avatar_url":"https://github.com/Nodeclient.png","language":"JavaScript","readme":"# mira-db2 Public Test\nMira Database `v2.0` non-complate alpha-1 public test version (2021)\n\n\n[download sample database](./test_databases.7z)\n\n---\n**All Test command's and connection string's :** \n\n#### SAMPLE  - (JS)\n``` js\nprocess.env.CACHE_SIZE = \"200\";\nconst MIRA = require('./mira2/main');\n\nconst connection = new MIRA.DATABASE({\n    location: `${__dirname}/databases`,\n    option: {\n        user: \"local\",\n        pass: \"\",\n        database: \"test1_db\"\n    }\n});\n\nconst _select = new MIRA.DB_COM_SELECT(connection);\n_select.select.table([\"person\"]).all((data) =\u003e {\n    console.log(\"\u003e\u003e\",data);\n});\n\n```\n\n\n\n#### SUPER (databese admin commands)\n``` js\n     const _super: MIRA.DB_COM_SUPER = new MIRA.DB_COM_SUPER(connection);\n     //Example list database users\n     _super.user.list((index: any, item: any) =\u003e {\n         console.log(index, item);\n     });\n     \n     //Example set new user permissions\n     _super.table.permissions = { \n      SELECT: true, ADD: true, UNIQUE: true, UPDATE: true, RENAME: true, DROP: true, DELETE: true, CREATE: true, LIST: true \n     }\n     \n    //Example create new database user\n     _super.user.add({\n         user: \"root\",\n         pass: \"1234\",\n         permission: _super.table.permissions ,\n         option: { ip: \"192.168.2.1\", mode: \"xw-\" }\n     }, (status: any) =\u003e {\n         console.log(status);\n    });\n```\n\n\n\n#### SELECT\n``` js\n//Example DB_COM_SELECT\n    const _select: MIRA.DB_COM_SELECT = new MIRA.DB_COM_SELECT(connection);\n    \n//Example select \u003e find \u003e equal query\n      _select.select.find([\"person\",\"login\"]).equal({ user: \"1\" }, (data: any) =\u003e {\n        console.log(data);\n     });\n//Example select \u003e find \u003e like query\n    _select.select.find([\"person\"]).like({ user:\"1\", pass:\"72\" }, (data: any) =\u003e {\n       console.log(data);\n    });\n//Example select \u003e limit query\n     _select.select.table([\"person\"]).limit({ start: 1, end: 5}, (data: any) =\u003e {\n         console.log(data);\n     });\n//Example select \u003e column query\n     _select.select.table([\"person\"]).column([\"user\"], (data: any) =\u003e {\n         console.log(data);\n     });\n//Example select \u003e count query\n     _select.select.table([\"person\",\"login\"]).count((data:any) =\u003e {\n         console.log(data);\n     });\n//Example select \u003e all query\n    _test.select.table([\"person\"]).all((data:any) =\u003e {\n        console.log(\"\u003e\u003e\",data);\n    });\n```\n---\n#### CREATE\n``` js\n//Example DB_COM_CREATE\n     const _create: MIRA.DB_COM_CREATE = new MIRA.DB_COM_CREATE(connection);\n//Example Table query\n       _create.table({ table: \"login3\", column: [\"user\",\"pass\",\"mail\"] }, (status: any) =\u003e {\n          console.log(status);\n      });\n//Example Database query\n     _create.database({ name: \"test1_db\", access: [\"*\"], encoding: \"utf-8\", option: { } }, (status: any) =\u003e {\n        console.log( status);\n     });\n```\n---\n#### ADD\n``` js\n//Example DB_COM_ADD\n    const _add: MIRA.DB_COM_ADD = new MIRA.DB_COM_ADD(connection);\n    \n    /* Example Static Column Types\n       _add.static.types = {\n           number: [\"pass\"]\n       };\n    */\n \n     //Example Add row query\n     _add.table.row({ table: \"person\", column: { user:`user-1`,pass:`pass${ Date.now()}`,mail: `test@my.net`} }, (data: any) =\u003e {\n        console.log(\"\u003e\u003e\",data);\n     }); \n     \n     //Example Add column query\n     _add.table.column({ table:\"person\" , column:[\"test1\",\"test2\"] ,value:[\"test1 value\",\"test2 value hello 2.0\"] }, (data: any) =\u003e {\n        console.log(data);\n     });\n     \n```\n---\n#### UPDATE\n``` js\n//Example DB_COM_UPDATE\n const _update: MIRA.DB_COM_UPDATE = new MIRA.DB_COM_UPDATE(connection);\n \n//Example update query\n _update.update.row({\n    table: \"person\", column: {  mail:\"test23@my.com\" }, find: { user: \"user-1\" }\n  }, (data: any) =\u003e {\n    console.log(data);\n });\n```\n---\n#### DELETE\n``` js\n//Example DB_COM_DELETE\n    const _del: MIRA.DB_COM_DELETE = new MIRA.DB_COM_DELETE(connection);\n    //Example delete column query\n    _del.delete.column({ table: \"person\", column: [\"mail\"] }, (data: any) =\u003e {\n      console.log(data);\n    });\n    //Example delete row query\n    _test.delete.row({ table: \"person\", find: { user: \"user-1\" } }, (data: any) =\u003e {\n      console.log(data);\n    });\n```\n---\n#### RENAME\n``` js\n//Example DB_COM_RENAME\n     const _ren: MIRA.DB_COM_RENAME = new MIRA.DB_COM_RENAME(connection);\n//Example rename table query\n     _ren.rename.table({ table:\"person\",value:\"8\"}, (data: any) =\u003e {\n         console.log(data);\n     });\n//Example rename column query\n    _ren.rename.column({ table:\"8\",column:{mail:\"email\"} }, (data: any) =\u003e {\n        console.log(data);\n    });\n//Example rename database query\n     _ren.rename.database({ value: \"test6_db\" }, (data: any) =\u003e {\n         console.log(data);\n    });\n```\n---\n#### DROP\n``` js\n//Example DB_COM_DROP\n    const _drop: MIRA.DB_COM_DROP = new MIRA.DB_COM_DROP(connection);\n//Example drop table query\n    _drop.drop.table({ table:[\"login88\"] }, (data: any) =\u003e {\n        console.log(data);\n    });\n//Example delete row query\n    _test.delete.row({ table: \"person\", find: { user: \"user-1\" } }, (data: any) =\u003e {\n      console.log(data);\n    });\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeclient%2Fmira-db2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodeclient%2Fmira-db2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeclient%2Fmira-db2/lists"}