{"id":16173163,"url":"https://github.com/joeferner/node-db-info","last_synced_at":"2026-05-28T12:01:08.570Z","repository":{"id":2023492,"uuid":"2959632","full_name":"joeferner/node-db-info","owner":"joeferner","description":null,"archived":false,"fork":false,"pushed_at":"2012-04-02T15:41:36.000Z","size":160,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-28T20:05:01.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"thibault/Napply","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeferner.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":"2011-12-11T19:22:05.000Z","updated_at":"2020-01-23T18:52:01.000Z","dependencies_parsed_at":"2022-09-04T15:02:07.363Z","dependency_job_id":null,"html_url":"https://github.com/joeferner/node-db-info","commit_stats":null,"previous_names":["nearinfinity/node-db-info"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joeferner/node-db-info","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-db-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-db-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-db-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-db-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeferner","download_url":"https://codeload.github.com/joeferner/node-db-info/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fnode-db-info/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33607334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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-10-10T04:06:55.060Z","updated_at":"2026-05-28T12:01:08.544Z","avatar_url":"https://github.com/joeferner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# db-info\n\ndb-info is a utility module which provides a database independent way of\ngetting database metadata.\n\nThe following databases are currently supported:\n\n * sqlite3 - via: [node-sqlite3](https://github.com/developmentseed/node-sqlite3)\n * mysql - via: [node-mysql](https://github.com/felixge/node-mysql)\n * PostgreSQL - via: [node-postgres](https://github.com/brianc/node-postgres)\n * Oracle - via: [node-oracle](https://github.com/mariano/node-db-oracle)\n\n## Quick Examples\n\n    var dbinfo = require(\"db-info\");\n\n    dbinfo.getInfo({\n      driver: 'mysql',\n      user: 'root',\n      password: 'root',\n      database: 'test'\n    }, function(err, result) {\n      /* result = {\n        tables: {\n          person: {\n            name: 'person',\n            columns: {\n              'id': { name: 'id', notNull: true, primaryKey: true, type: 'integer', length: '11' },\n              'name': { name: 'name', notNull: true, type: 'varchar', length: '255' },\n              'email': { name: 'email', notNull: false, type: 'varchar', length: '100' },\n              'age': { name: 'age', notNull: false, type: 'integer', length: '11' }\n            }\n          }\n        }\n      } */\n    });\n\n## Download\n\nYou can install using Node Package Manager (npm):\n\n    npm install async\n\n## Documentation\n\n### Command Line\n\n    db-info --driver=pg --connectionString=--connectionString=tcp://test:test@localhost/test\n\n### getInfo(opts, callback)\n\nGets the metadata from a database.\n\n__Arguments__\n\n * opts - A hash of options.\n  * driver - can be either \"mysql\", \"sqlite3\", \"db-oracle\", or \"pg\" (PostgreSQL)\n  * _db_ - if db is passed in this connection will be used instead of making a new connection.\n  * _other_ - will be passed to the drivers connect.\n * callback(err, result) - Callback called once complete. result will contain a hash containing all the tables\n   along with column information.\n\n__Example__\n\n    var db = new sqlite3.Database(':memory:');\n\n    dbinfo.getInfo({\n      driver: 'sqlite3',\n      db: db\n    }, function(err, result) {\n    });","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fnode-db-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeferner%2Fnode-db-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fnode-db-info/lists"}