{"id":23209028,"url":"https://github.com/thestevendev/query-planner","last_synced_at":"2025-04-05T12:09:57.513Z","repository":{"id":268168972,"uuid":"903515666","full_name":"TheStevenDev/Query-Planner","owner":"TheStevenDev","description":"Query-Planner is a Java-based application designed for efficient scheduling, management, and execution of SQL queries with an intuitive graphical interface.","archived":false,"fork":false,"pushed_at":"2024-12-14T20:44:28.000Z","size":495,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T12:09:54.103Z","etag":null,"topics":["database","java","query","query-builder","queryplan","sql"],"latest_commit_sha":null,"homepage":"https://www.stevendamore.it","language":"Java","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/TheStevenDev.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-12-14T19:52:23.000Z","updated_at":"2024-12-14T20:44:48.000Z","dependencies_parsed_at":"2024-12-14T21:28:44.965Z","dependency_job_id":"e16ef413-00a0-4191-ad9f-0b123ce121b6","html_url":"https://github.com/TheStevenDev/Query-Planner","commit_stats":null,"previous_names":["thestevendev/query-planner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStevenDev%2FQuery-Planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStevenDev%2FQuery-Planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStevenDev%2FQuery-Planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheStevenDev%2FQuery-Planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheStevenDev","download_url":"https://codeload.github.com/TheStevenDev/Query-Planner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332610,"owners_count":20921853,"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","java","query","query-builder","queryplan","sql"],"created_at":"2024-12-18T18:13:47.389Z","updated_at":"2025-04-05T12:09:57.495Z","avatar_url":"https://github.com/TheStevenDev.png","language":"Java","readme":"# QueryPlanner Project Documentation\n\n## 1. Introduction\nQueryPlanner is a Java application designed to allow users to schedule and manage the execution of queries on a MySQL database. The system enables users to define programmable queries with options for recurring execution, date and time management, and database connection parameter configuration.\n\n![Planner Image](images/planner.png)\n\n## 2. Main Features\n- **Query Scheduling**: Users can define SQL queries to be executed at specific intervals or at a precise date and time.\n- **Database Connection**: Configure connection parameters such as IP address, port, username, password, and database name.\n- **Scheduling Management**: Queries can be configured to repeat on a daily, weekly, or monthly basis, with an optional date range during which the query will be executed.\n- **Execution Type Management**: Supports one-time or recurring executions based on configuration.\n\n## 3. Project Structure\nThe project is organized into various packages and core classes:\n- **ScheduledQuery**: Manages the configuration of scheduled queries.\n- **Validator**: Contains validation methods for connection and scheduling information.\n- **DatabaseConnector**: Responsible for connecting to the MySQL database and executing queries.\n\n## 4. Database File `QueryDatasFile.qpl`\nThe `QueryDatasFile.qpl` file is used to store information about scheduled queries. It is a plain text file containing the necessary data to execute the scheduled queries, including database connection details, execution parameters, and specific query settings.\n\n### File Format\nThe `QueryDatasFile.qpl` file is structured in a human-readable text format, with each line representing a single scheduled query. Fields are separated by a delimiter (such as a comma or semicolon). An example line might look like: ```idQuery,ipAddress,port,user,password,dbName,queryText,type,startDate,endDate,executionTime,weekDays 1,192.168.1.100,3306,admin,password,TestDB,\"UPDATE ...\",01/01/2024,12/31/2024,10:00,1,0,1,0,0,1,0```\n\n### Description of Fields\n- **idQuery**: Unique identifier for the query.\n- **ipAddress**:\n  - IP address of the database.\n- **port**:\n  - Port for the database connection.\n- **user**:\n  - Username for the database login.\n- **password**:\n  - Password for the database login.\n- **dbName**:\n  - The name of the database to execute the query on.\n- **queryText**:\n  - The SQL query to execute.\n- **type**:\n  - Type of execution (\"repeat\" for recurring executions, \"one-time\" for a single execution).\n- **startDate**:\n  - Start date for query execution.\n- **endDate**:\n  - End date for query execution (optional for repeated executions).\n- **executionTime**:\n  - Time for query execution.\n- **weekDays**:\n  - An array representing the days of the week when the query should be executed (1 for executed, 0 for not executed).\n \n  - ![Query Executor Image](images/executor.png)\n\n\n\n## 6. Requirements\n- **Java**: The project is developed using Java, so a recent version of the JDK is required.\n- **MySQL**: A functioning MySQL connection is needed to execute the queries.\n- **Maven**: Maven is used for dependency management.\n\n## 7. Running the Project\n\n### Configure Dependencies:\nEnsure Maven is installed. Add the necessary dependencies for MySQL in the `pom.xml` file:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003emysql\u003c/groupId\u003e\n    \u003cartifactId\u003emysql-connector-java\u003c/artifactId\u003e\n    \u003cversion\u003e8.0.26\u003c/version\u003e\n\u003c/dependency\u003e\n```\n## 8. Cloning the Project\n\nYou can clone the QueryPlanner project from the official GitHub repository:\n\n```bash\ngit clone https://github.com/your-username/queryplanner.git\n```\n\nOnce the project is cloned, navigate to the project folder:\n\n```bash\ncd queryplanner\n```\n\nInstall dependencies with Maven:\n```bash\nmvn install\n```\n\n## 9. Icon Usage\n\nThe icons used in the project are sourced from [Icons8](https://icons8.com), which offers a wide set of free icons for use in software projects. You can find more free and licensed icons under the Icons8 License at the following link: [Icons8 Icons](https://icons8.com/icons).\n\nThe icons used in this project are intended for non-commercial or educational purposes as per Icons8's license terms.\n\n## 10. MIT License\n\nThis project is licensed under the MIT License. You are free to use, modify, and distribute this software, but without any warranties.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestevendev%2Fquery-planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthestevendev%2Fquery-planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestevendev%2Fquery-planner/lists"}