Skip to content

Commit

Permalink
Improve README language
Browse files Browse the repository at this point in the history
  • Loading branch information
Thijsiez committed Oct 23, 2024
1 parent b8cf891 commit 031d6db
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ A dynamic, type-safe way to write your queries
## Features
### Queries
- Supports the following expressions in a type-safe and null-safe way for all columns
- `eq`, `neq`, `lt`, `gt`, `lte`, `gte`, `in`, `notIn`, `between`, and `notBetween`
- `eq`, `neq`, `lt`, `gt`, `lte`, `gte`, `in`, `notIn`, `between`, and `notBetween`
- Supports `like` and `notLike` expressions in a null-safe way for String columns
- Supports `and`/`andGroup` and `or`/`orGroup` expressions for building up a query
### Code Generation
- Generate objects containing columns for non-transient and non-mapped fields for classes annotated `@Entity` and extending `PanacheEntity`/`PanacheEntityBase`
- Generate an extension function file containing query entry points for classes with companion objects extending `PanacheCompanion`/`PanacheCompanionBase`
- `where`/`whereGroup`, `count`, `delete`, `find`, `stream`, `single`, `singleSafe`, and `multiple`
- Optionally adds `@Generated` annotation to all generated code so it can more easily be excluded from test coverage reporting
- Optionally override a `Column<T>`'s type by using the `ColumnType` annotation
- Useful when using JPA Converters, since the field type is different to the column's type
- Generate `Column<T>`s for non-transient and non-mapped fields in classes annotated `@Entity` and extending `PanacheEntity`/`PanacheEntityBase`
- Generate query entry point extension functions for classes with companion objects extending `PanacheCompanion`/`PanacheCompanionBase`
- `where`/`whereGroup`, `count`, `delete`, `find`, `stream`, `single`, `singleSafe`, and `multiple`
- Allows for overriding the generated `Column<T>`'s type parameter using `@ColumnType`
- Especially useful when using JPA `@Converter` when the field's type is different to the column's type
- Optionally annotate generated code with `@Generated` so it can more easily be excluded from test coverage reporting

## Known Issues
- Code generation does not play well with column of generic types, but as far as I'm aware this is difficult to get working with Hibernate anyway
- Code generation does not handle fields of generic types (e.g. `List<E>`, `Set<E>`, etc.), but as far as I'm aware this is difficult to get working with Hibernate anyway. Consider using a JPA `@Converter` in combination with `@ColumnType`

## Planned Features
- DSL for sorting expressions
- Query components for UPDATE queries
- DSL for UPDATE queries

0 comments on commit 031d6db

Please sign in to comment.