{"id":18273407,"url":"https://github.com/blinet/qmy","last_synced_at":"2025-04-09T03:40:24.884Z","repository":{"id":65518802,"uuid":"412485156","full_name":"blinet/qmy","owner":"blinet","description":"Quick mysql is a powerful module that makes the mysql system easier, simpler and faster","archived":false,"fork":false,"pushed_at":"2022-04-18T18:39:26.000Z","size":604,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T09:04:08.990Z","etag":null,"topics":["database","db","javascript","mysql","mysql2","nodejs","quick","sql"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blinet.png","metadata":{"files":{"readme":"README.md","changelog":"Changes.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2021-10-01T13:50:58.000Z","updated_at":"2022-03-03T21:58:52.000Z","dependencies_parsed_at":"2023-01-27T00:55:10.949Z","dependency_job_id":null,"html_url":"https://github.com/blinet/qmy","commit_stats":null,"previous_names":["4i8/qmy"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinet%2Fqmy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinet%2Fqmy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinet%2Fqmy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blinet%2Fqmy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blinet","download_url":"https://codeload.github.com/blinet/qmy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974584,"owners_count":21026742,"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","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":["database","db","javascript","mysql","mysql2","nodejs","quick","sql"],"created_at":"2024-11-05T12:06:19.226Z","updated_at":"2025-04-09T03:40:24.856Z","avatar_url":"https://github.com/blinet.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\r\n  \u003cp\u003e\r\n \u003ca href=\"https://www.npmjs.com/package/qmy\"\u003e\u003cimg  src=\"https://raw.githubusercontent.com/4i8/qmy/main/logo/Qmy.png\" width=\"400\" alt=\"qmy\" /\u003e\u003c/a\u003e\r\n  \u003c/p\u003e\r\n  \u003cp\u003e\r\n \u003ca href=\"https://github.com/4i8/\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=powered%20by\u0026message=Aros\u0026color=000636\u0026style=for-the-badge\u0026logo=Windows%20Terminal\u0026logoColor=fff\"/\u003e\u003c/a\u003e\r\n \u003ca href=\"https://www.npmjs.com/package/qmy\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/qmy.svg?style=for-the-badge\" alt=\"NPM version\" /\u003e\u003c/a\u003e\r\n \u003ca href=\"https://www.npmjs.com/package/qmy\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/qmy.svg?maxAge=3600\u0026style=for-the-badge\" alt=\"NPM downloads\" /\u003e\u003c/a\u003e\r\n \u003ca href=\"https://discord.gg/r7sgerWCcT\"\u003e\u003cimg src=\"https://img.shields.io/discord/894463244188676116?https://img.shields.io/static/v1?text=f\u0026style=for-the-badge\u0026logo=discord\u0026logoColor=fff\" alt=\"Discord server\" /\u003e\u003c/a\u003e\r\n\r\n  \u003c/p\u003e\r\n\u003c/div\u003e\r\n\r\n## About\r\n\r\nQuick [mysql](https://www.mysql.com/) is a powerful module that makes the mysql system easier, simpler and faster\r\n\r\n- Speed\r\n- Unlimited connection without losing connection\r\n- Easy to use\r\n- High security\r\n\r\n## Installation\r\n\r\n```sh-session\r\nnpm install qmy\r\nyarn add qmy\r\n```\r\n\r\n## Announcement \r\n\r\n\u003e **(+)connect() will resolve the process by calling the then() function and it will give you a notification that the connection was successful if there is an error, it will reject the process and you can call the catch() function and it will give you the error\u003cbr\u003e(-)Remove Reminders New Versions**\r\n\r\n## Example usage\r\n\r\n\u003e **Connection Config**\r\n\r\n```js\r\n host: \"localhost\",\r\n port: 3306,\r\n localAddress: undefined,\r\n socketPath: undefined,\r\n user: undefined,\r\n password: undefined,\r\n database: undefined,\r\n connectTimeout: 10000,\r\n insecureAuth: false,\r\n supportBigNumbers: false,\r\n bigNumberStrings: false,\r\n dateStrings: false,\r\n debug: undefined,\r\n trace: true,\r\n stringifyObjects: false,\r\n timezone: \"local\",\r\n flags: \"\",\r\n queryFormat: undefined,\r\n pool: undefined,\r\n ssl: false,\r\n localInfile: true,\r\n multipleStatements: false,\r\n typeCast: true,\r\n maxPacketSize: 0,\r\n charsetNumber: 33,\r\n clientFlags: 455631,\r\n protocol41: true,\r\n```\r\n\r\n### #Note\r\n\r\n##### Direct connection problem solving: [Here](#connect)\r\n\r\n\u003e **create connection**\r\n\r\n**Start by creating a connection to the database.\r\nUse the username and password from your MySQL database or use uri**\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\n```\r\n\r\n## Documentation\r\n\r\n\u003ctable\u003e\r\n  \u003ctr\u003e\r\n    \u003cth\u003eMethod\u003c/th\u003e\r\n    \u003cth\u003eDescription\u003c/th\u003e\r\n    \u003cth\u003eexplain\u003c/th\u003e\r\n  \u003ctr\u003e\r\n    \u003ctd\u003econnect\u003c/td\u003e\r\n    \u003ctd\u003econnect() will resolve the process by calling the then() function and it will give you a notification that the connection was successful if there is an error, it will reject the process and you can call the catch() function and it will give you the error\r\n\u003c/td\u003e\r\n    \u003ctd\u003e\u003ca href=#connect\u003eGo to example\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n   \u003ctr\u003e\r\n    \u003ctd\u003equery\u003c/td\u003e\r\n    \u003ctd\u003eUse SQL statements to read from (or write to) a MySQL database. This is also called \"to query\" the database.\r\nThe connection object created in the example above, has a method for querying the database\u003c/td\u003e\r\n    \u003ctd\u003e\u003ca href=#query\u003eGo to example\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n     \u003ctr\u003e\r\n    \u003ctd\u003eget\u003c/td\u003e\r\n    \u003ctd\u003eused to select data from a database\u003c/td\u003e\r\n    \u003ctd\u003e\u003ca href=#get\u003eGo to example\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n    \u003ctd\u003eremove\u003c/td\u003e\r\n    \u003ctd\u003eused to delete existing records in a table\u003c/td\u003e\r\n    \u003ctd\u003e\u003ca href=#remove\u003eGo to example\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n    \u003ctd\u003eset\u003c/td\u003e\r\n    \u003ctd\u003eused to insert new records in a table\u003c/td\u003e\r\n    \u003ctd\u003e\u003ca href=#set\u003eGo to example\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n   \u003c/tr\u003e\r\n    \u003ctr\u003e\r\n    \u003ctd\u003eupdate\u003c/td\u003e\r\n    \u003ctd\u003eused to modify the existing records in a table\u003c/td\u003e\r\n    \u003ctd\u003e\u003ca href=#update\u003eGo to example\u003c/a\u003e\u003c/td\u003e\r\n  \u003c/tr\u003e\r\n\u003c/table\u003e\r\n\r\n## connect\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\nconnection\r\n  .connect()\r\n  .then(() =\u003e {\r\n    //do something\r\n    //...\r\n  })\r\n  .catch((error) =\u003e {\r\n    //do something\r\n    //...\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## query\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\nconnection\r\n  .connect()\r\n  .then(() =\u003e {\r\n    connection\r\n      .query(\"\u003cSQL statements\u003e\")\r\n      .then((result) =\u003e {\r\n        console.log(result);\r\n      })\r\n      .catch((err) =\u003e {\r\n        console.log(err);\r\n      });\r\n  })\r\n  .catch((error) =\u003e {\r\n    //do something\r\n    //...\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## get\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\nconnection\r\n  .connect()\r\n  .then(() =\u003e {\r\n    connection\r\n      .get(\"\u003ctable\u003e\", \"\u003cWhere\u003e:\u003cPrimaryKey\u003e\")\r\n      .then((result) =\u003e {\r\n        console.log(result);\r\n      })\r\n      .catch((err) =\u003e {\r\n        console.log(err);\r\n      });\r\n  })\r\n  .catch((error) =\u003e {\r\n    //do something\r\n    //...\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## remove\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\nconnection\r\n  .connect()\r\n  .then(() =\u003e {\r\n    connection\r\n      .remove(\"\u003ctable\u003e\", \"\u003cWhere\u003e:\u003cPrimaryKey\u003e\")\r\n      .then((result) =\u003e {\r\n        console.log(result);\r\n      })\r\n      .catch((err) =\u003e {\r\n        console.log(err);\r\n      });\r\n  })\r\n  .catch((error) =\u003e {\r\n    //do something\r\n    //...\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## set\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\nconnection\r\n  .connect()\r\n  .then(() =\u003e {\r\n    connection\r\n      .set(\r\n        {\r\n          table: \"users\",\r\n          column: \"id - name - color\",\r\n          values: \"2324249073 - arth - red\",\r\n        },\r\n        { sign: \"-\" }\r\n      )\r\n      .then((result) =\u003e {\r\n        console.log(result);\r\n      })\r\n      .catch((err) =\u003e {\r\n        console.log(err);\r\n      });\r\n  })\r\n  .catch((error) =\u003e {\r\n    //do something\r\n    //...\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## update\r\n\r\n```js\r\nconst qmy = require(\"qmy\");\r\n\r\nconst connection = new qmy({\r\n  database: \"\u003cdatabase\u003e\",\r\n  host: \"\u003chost\u003e\",\r\n  password: \"\u003cpassword\u003e\",\r\n  port: 3306,\r\n  user: \"\u003cuser\u003e\",\r\n});\r\nconnection\r\n  .connect()\r\n  .then(() =\u003e {\r\n    connection\r\n      .update({\r\n        table: \"users\",\r\n        column: \"name\",\r\n        PrimaryKey: \"id:2324249073\",//\u003cWhere\u003e:\u003cPrimaryKey\u003e\r\n        value: \"arth\",\r\n      })\r\n      .then((result) =\u003e {\r\n        console.log(result);\r\n      })\r\n      .catch((err) =\u003e {\r\n        console.log(err);\r\n      });\r\n  })\r\n  .catch((error) =\u003e {\r\n    //do something\r\n    //...\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## Links\r\n\r\n- [Twiter](https://twitter.com/onlyarth)\r\n- [Github](https://github.com/4i8)\r\n- [Documentation](#documentation)\r\n\r\n## License\r\n\r\n- [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblinet%2Fqmy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblinet%2Fqmy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblinet%2Fqmy/lists"}