{"id":18609719,"url":"https://github.com/unlight/database-utils","last_synced_at":"2025-11-02T20:30:28.966Z","repository":{"id":8712579,"uuid":"10381213","full_name":"unlight/database-utils","owner":"unlight","description":"Database utils for node.js.","archived":false,"fork":false,"pushed_at":"2017-03-20T20:18:39.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-29T22:07:10.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unlight.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-30T11:20:09.000Z","updated_at":"2016-07-21T10:16:13.000Z","dependencies_parsed_at":"2022-09-05T02:21:20.471Z","dependency_job_id":null,"html_url":"https://github.com/unlight/database-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fdatabase-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fdatabase-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fdatabase-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fdatabase-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unlight","download_url":"https://codeload.github.com/unlight/database-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239400596,"owners_count":19632049,"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":[],"created_at":"2024-11-07T03:07:03.714Z","updated_at":"2025-11-02T20:30:28.824Z","avatar_url":"https://github.com/unlight.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED\r\n\r\nDEPRECATION NOTICE.  \r\nThis project is not maintained.\r\n\r\nThis module does not follow best practice, do not use it.  \r\nFor researches and arhceologiust only.\r\n\r\nCollection of libraries to work with database\r\n---------------------------------------------\r\n\r\nQuery builder\r\n-------------\r\nExample 1:\r\n```javascript\r\nvar sqldriver = new SqlDriver();\r\nvar sql = sqldriver\r\n\t.parameters()\r\n\t.select(\"*\")\r\n\t.from(\"user\")\r\n\t.where(\"id\", 5)\r\n\t.get();\r\n// select * from user where id = 5\r\n```\r\n\r\nExample 2:\r\n```javascript\r\nsql = sqldriver\r\n\t.parameters()\r\n\t.select(\"*\")\r\n\t.from(\"user\")\r\n\t.where(\"id\", 5)\r\n\t.getQuerySql();\r\n\r\nvar query = sql[0]; // select * from user where id = ?\r\nvar params = sql[1]; // [5]\r\n```\r\n\r\nTODO\r\n----\r\n- ORM\r\n- make new methods getQuerySql() return sql with ? getQueryParameters return place holder as array.\r\n- [hold, need execute] replace($table = '', $set = null, $where, $checkexisting = false)\r\n- [hold] history($updatefields = true, $insertfields = false)\r\n- [hold, need depends on execute] simple getcount\r\n- [hold, need depends on execute] simple getcountlike\r\n- [hold, need depends on execute] simple getwhere\r\n- [hold] limit in update()\r\n- [hold] in delete()","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fdatabase-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funlight%2Fdatabase-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fdatabase-utils/lists"}