Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Osiris-Team committed Mar 7, 2024
2 parents a29faa1 + f31a38a commit 8c0c430
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,45 +66,44 @@ one row and has public fields like `obj.id obj.name etc...`.
### ⚡️ Compile-/Typesafe SQL queries via WHERE class
### ⚡️ Various utility methods, like fetching results lazily

#### Pros

##### Safety
### Safety
- Secured against SQL-Injection by using prepared statements.
- Protection against timed out connections.
- 0% boilerplate and simple code decreasing the risk for bugs.
- (Optional) Helper WHERE class for generating simple and complex SQL queries, from compile-safe functions.

##### Performance
### Performance
- No runtime overhead for class generation (unlike other ORMs).
- Cached connection pool ensures optimal performance on small and huge databases.
Besides that it provides protection against timed out connections.
- (Optional) Cached results for ultra-fast data retrieval
(cache gets cleared after INSERT/UPDATE/DELETE operations and is
simply a map with SQL statements mapped to their results lists).

##### Customization
### Customization
- Generated classes can be enhanced by adding your own custom code at the top of the class.
- Name your tables/columns however you like since internally names are encapsulated in backticks.

##### SQL & JDBC
### SQL & JDBC
- The generated SQL code should be compatible with all types of SQL databases.
- Supports all JDBC data types + some extras like enum. ![img.png](img.png)
- `NULL` is not allowed, instead use the `DEFAULT ''` keyword.
- Supports DEFAULT for blobs. Example: `file BLOB DEFAULT ''`.
- Supports SQL DEFAULT for `NOW(), CURDATE(), CURTIME()`.

##### Other
### Other
- Simple UI to design databases within minutes.
- Database structure/design as JSON file.
- Autosuggestions for field definitions.
- Easily use multiple databases in a single project.
- The generated Java code does not require any third party libraries and should work with Java 8 or higher. It uses the built in JDBC API for SQL queries.
- (Optional) Supports generating Vaadin Flow Form to create/update/delete each object/row.

#### Cons
### Cons
- Updating existing tables is a bit rough (removed fields/columns must be also removed manually from the database, especially "not null fields").
A fix for this is being worked on: https://github.com/Osiris-Team/jSQL-Gen/issues/7
- You need to know a bit of SQL, especially about definitions and defaults. This could be fixed by simplifying the GUI further.
- Internally a `idCounter` is used for each table, meaning if rows are added by another program the counter won't be accurate anymore and thus further insert operations will fail.

## Tipps
- You can select a project directory to directly generate the code in there. The generated code/files can also be found in the `generated` folder (press `Show Data` on the first tab, to open the location).
Expand Down

0 comments on commit 8c0c430

Please sign in to comment.