{"id":25491572,"url":"https://github.com/fatihtatoglu/db-go","last_synced_at":"2026-05-02T01:35:35.153Z","repository":{"id":227439514,"uuid":"771411984","full_name":"fatihtatoglu/db-go","owner":"fatihtatoglu","description":"Generic database package for Go (golang)","archived":false,"fork":false,"pushed_at":"2024-04-01T22:10:38.000Z","size":29,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T14:14:11.869Z","etag":null,"topics":["database","golang","golang-package"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fatihtatoglu.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":"2024-03-13T08:55:08.000Z","updated_at":"2024-03-21T01:18:22.000Z","dependencies_parsed_at":"2024-06-21T12:58:58.773Z","dependency_job_id":"d7c05323-6f38-4d74-b8a1-4fddb5258123","html_url":"https://github.com/fatihtatoglu/db-go","commit_stats":null,"previous_names":["fatihtatoglu/db-go"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihtatoglu%2Fdb-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihtatoglu%2Fdb-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihtatoglu%2Fdb-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihtatoglu%2Fdb-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fatihtatoglu","download_url":"https://codeload.github.com/fatihtatoglu/db-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239558932,"owners_count":19658934,"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","golang","golang-package"],"created_at":"2025-02-18T22:18:17.485Z","updated_at":"2025-11-08T18:30:19.539Z","avatar_url":"https://github.com/fatihtatoglu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# db-go\n\nThe Database Go Package is a collection of tools for working with databases in Go applications. It provides functionalities for managing database connections, executing commands, and handling rows and tables. With this package, developers can easily interact with databases in their Go projects, making database-related tasks more efficient and straightforward.\n\n## Install\n\n```bash\ngo get github.com/fatihtatoglu/db-go\n```\n\n## Usage\n\n### Creating a Database Connection\n\n```go\nconfig := db.CreateNewDBConfig(\"mysql\", \"username\", \"password\", \"localhost\", 3306, \"database_name\")\nconnection, err := db.CreateNewDBConnection(config)\nif err != nil {\n    // handle error\n}\n\nerr = connection.Open()\nif err != nil {\n    // handle error\n}\n\ndefer connection.Close()\n\n```\n\n### Executing Commands\n\n```go\ncommand, err := db.CreateNewDBCommand(connection)\nif err != nil {\n    // handle error\n}\n\n_, err = command.Execute(\"CREATE TABLE users (name VARCHAR(255), age INT)\")\nif err != nil {\n    // handle error\n}\n\n```\n\n### Executing Commands with Parameters\n\n```go\nresult, err := db.Execute(\"INSERT INTO users (name, age) VALUES (?, ?)\", \"John Doe\", 30)\n if err != nil {\n  // handle error\n }\n fmt.Println(\"Rows affected:\", result.RowsAffected)\n```\n\n### Querying Data\n\n```go\nquery := \"SELECT * FROM users\"\nresult, err := command.Query(query)\nif err != nil {\n    // handle error\n}\n\n```\n\n### Querying Data with Parameters\n\n```go\nquery := \"SELECT * FROM users WHERE age \u003e ?\"\nresult, err := command.Query(query, 25)\nif err != nil {\n    // handle error\n}\n\n```\n\n## Features\n\n- [X] Support for various database drivers including;\n  - [X] MySQL\n  - [ ] PostgreSQL\n  - [ ] SQLite\n  - [ ] SQL Server\n- [ ] Easy-to-use API for executing SQL queries, fetching data, and managing database connections\n- [ ] Efficient handling of database transactions and error handling\n\n## Credits\n\n- [Fatih Tatoğlu](https://github.com/fatihtatoglu)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatihtatoglu%2Fdb-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatihtatoglu%2Fdb-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatihtatoglu%2Fdb-go/lists"}