{"id":20901289,"url":"https://github.com/siyovush-hamidov/postgresql-cpp-connector","last_synced_at":"2025-12-27T10:11:09.741Z","repository":{"id":247927406,"uuid":"826984237","full_name":"siyovush-hamidov/postgresql-cpp-connector","owner":"siyovush-hamidov","description":"🏙️This project showcases a C++ application that connects to a PostgreSQL database to query information. With a simple terminal interface, users can easily retrieve data by entering the prompt. ","archived":false,"fork":false,"pushed_at":"2024-09-16T06:34:08.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T20:31:44.758Z","etag":null,"topics":["cpp","devops","libpqxx","postgres","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"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/siyovush-hamidov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-10T19:25:05.000Z","updated_at":"2025-02-10T05:13:35.000Z","dependencies_parsed_at":"2024-07-11T11:23:26.181Z","dependency_job_id":"3641191e-0b19-4bd5-90d3-aa7d26a2e5af","html_url":"https://github.com/siyovush-hamidov/postgresql-cpp-connector","commit_stats":null,"previous_names":["siyovush-hamidov/postgresql-with-cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/siyovush-hamidov/postgresql-cpp-connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyovush-hamidov%2Fpostgresql-cpp-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyovush-hamidov%2Fpostgresql-cpp-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyovush-hamidov%2Fpostgresql-cpp-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyovush-hamidov%2Fpostgresql-cpp-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siyovush-hamidov","download_url":"https://codeload.github.com/siyovush-hamidov/postgresql-cpp-connector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siyovush-hamidov%2Fpostgresql-cpp-connector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28077395,"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-12-27T02:00:05.897Z","response_time":58,"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":["cpp","devops","libpqxx","postgres","postgresql","sql"],"created_at":"2024-11-18T11:29:16.459Z","updated_at":"2025-12-27T10:11:09.701Z","avatar_url":"https://github.com/siyovush-hamidov.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏙️ PostgreSQL C++ Connector 🌆\n\nWelcome to **PostgreSQL with C++: City Explorer**! 🚀 This project showcases a simple yet powerful example of how to connect a C++ application to a PostgreSQL database using the `libpqxx` library. With this project, you can explore the 10 largest cities in the USA right from your terminal! 🌎\n\n## Features ✨\n\n- **Easy Setup** 🛠️: Quickly set up and get started with minimal configuration.\n- **Simple Interface** 💻: Interact with the database through a clean and intuitive terminal interface.\n- **Robust Design** 🏗️: Organized code structure with a dedicated PostgreSQL class for easy database management.\n- **Educational** 📚: Perfect for learning how to integrate C++ with PostgreSQL using `libpqxx`.\n\n## Why Use This Project? 🌟\n\n- **Learn by Doing** 👨‍💻: Hands-on experience is the best way to learn. This project provides a practical example of database integration.\n- **Boost Your Skills** 🚀: Improve your C++ and SQL knowledge by exploring real-world applications.\n- **Reusable Code** ♻️: The PostgreSQL class can be easily adapted for other projects requiring database interactions.\n\n## How to Get Started 🏁\n\n1. **Clone the Repository** 🧩:\n   ```bash\n   git clone https://github.com/siyovush-hamidov/postgresql-cpp-connector.git\n   cd postgresql-cpp-connector\n   ```\n\n2. **Install Dependencies** 📦:\n   - Make sure you have PostgreSQL and `libpqxx` installed.\n   - Set up your PostgreSQL server and create the `cities` table with the top 10 largest cities in the USA.\n\n3. **Compile the Code** 🛠️:\n   ```bash\n   g++ -std=c++11 main.cpp PostgresDB.cpp -o connector `pkg-config --cflags --libs libpqxx`\n   ```\n\n4. **Run the Program** ▶️:\n   ```bash\n   ./city_explorer\n   ```\n\n5. **Explore the Cities** 🗺️:\n   - Enter the city ID to see the city name.\n   - Type `0` to exit the program.\n\n## Additional Resources:\n\n- https://www.postgresql.org/docs/7.2/libpqplusplus.html\n- https://www.instaclustr.com/support/documentation/postgresql/using-postgresql/connecting-to-postgresql-with-c-plus-plus/\n\n## Contributions Welcome! 🤝\n\nWe love contributions! Feel free to fork the repository and submit pull requests. Let's make this project even better together! 🌟\n\n## License 📜\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiyovush-hamidov%2Fpostgresql-cpp-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiyovush-hamidov%2Fpostgresql-cpp-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiyovush-hamidov%2Fpostgresql-cpp-connector/lists"}