- Immutable entities
From this version, Entities are immutable. As a result of every object change (via a setter), a new instance is created. Immutable objects can be easily cloned by reference duplication. Because of that, Daobab Entities are fully thread-safe.
- Frozen queries
Every query (Daobab object) can be frozen. After this operation, the query cannot be modified (until unfrozen).
Frozen queries are extremely fast, similar to regular native queries.
This kind of query still accepts dynamic parameters (as JPA Repository does).
Daobab native queries — those where you provide the SQL directly — are also frozen from now on. It is possible to use parameters on them as well.
- Ultra-fast JSON conversion
Really fast internal JSON conversion. Daobab uses its knowledge of field types to make JSON conversion very efficient.
- Internal TypeConverters
Responsible for converting database objects to any Java type.
- Introduced REPLACE INTO
Insert that acts only on duplicated records.
- Introduced ON DUPLICATE KEY UPDATE
Actions triggered when rows are duplicated.
- Insert for selected columns only
- Removed countAny and distinct methods from query objects
Those operations are now available as regular functions.
- Entities must have two constructors
Daobab reverse engineering creates entities with two constructors. This speeds up internal immutable object creation.
- Introduced ColumnCache — column interfaces are simplified and optimized
- EntityRelation interface renamed to RelatedTo
- Massive internal refactoring and cleanup
Contains a serious bug. Please ignore
- Kotlin support
It's possible to execute a reverse engineering for Kotlin
Daobab supports null safety types.
Kotlin DataBaseTarget contains the entire tables instances. The dedicated *Tables interface is not needed anymore.
Kotlin example project added to the repository.
- Column interfaces needs a second type which is their field Type
By introducing this change, it's possible to quickly change the type after reverencing engineering.
In Kotlin it's used for nullability indicator - by using or removing a question mark.
- The default date fields in java are based on java.time package not java.util as before
- added MsSql support
- Introduced TypeConverters. It's possible to have own datatypes. Daobab will dynamically convert it via YourType<-->DBType.
- skip (QueryEntity) - selected columns won't be read for an entity.
- only(QueryEntity) - only selected columns will be read for an entity.
- compositeKeys - refactoring and improvements
- fixed some functions
- improved query generations
- 'having' statement fixed
- Extensive work on functions.
Since functions are strictly tied to a specific database engine,
several FunctionWhisperer interfaces have been created.
They expose database-specific functions in a structured way.
- MSSQL support
- Fixed limits on Entities and Plates
- Plates can now be ordered
- Fixed the LIKE issue for Entities and Plates
- Fixed predicate handling for inner WHERE clauses
- Fixed predicate bugs in WHERE clauses
- Fixed Generator issues
- Internal redesign of query-building logic.
A target can now have a dedicated query builder. Having a single query builder shared across all targets is no longer a constraint.
As a result, Daobab is able to build non-SQL queries as well.
- NoHeap targets, still as an experimental feature.
NoHeap targets store data outside the Heap memory. Keeping large amounts of data in this area does not impact Java GC performance.
Querying them with SQL queries is possible, but there are still some edge cases to resolve.
- NoHeap buffers are automatically indexed.
Indexes provide a significant improvement in query performance.
- Database targets can use the showSql flag.
When enabled, every query will be logged.
- Massive internal optimization.
- String based column identifiers are being handled into where/having/group/order clauses. Also it's possible to retrieve the values from Plates by those identifiers.
- getValueOrElse methods added into the Plate
- added 'from' method into the queries. For most of the queries it's not necessary, but there are some corner case where pointing the root table is helpful.
- Where or Having methods in/notIn has been renamed to inFields/notInFields for collections
- Fixed some methods into the Having clause
- Entire Query may be used as an argument for a function or another query
- every target has a method to call stored procedures by default. If some target does not allow to call procedures, an error is being thrown.
- functions invoking has been changed.
- Functions - dedicated interfaces to invoke Oracle, MySql, H2, PostgreSQL
- function result can be cast immediately to a particular type
- functions can be assigned to a string
- DataBaseTarget provides an meta information about tables and columns
- Meta information has been extended by indexes and keys
- Querying over meta information instead of typical entities and columns
- MetaData - DatabaseTarget reads the real database structure during the initialization. It may be used for any kind of comparison between tables or to check, whether the currently generated classes are still complaint with the real schema.
it's possible to select over those data like on any other target.
- Statistics - every target may use statistic now.
You may access and query over the statistic collection, like on any other entity collection.
- Composites - a set of columns may be used as into queries for example to make quick whereEquals over many columns.
- PrimaryCompositeKey - PrimaryKeys on many columns.
- ByteBuffers - (unfinished) Daobab is able to work on structures outside the java Heap. It's a good solution for huge tables. Provides a huge performance gain.
- Improved Entities
- TableColumns - Every table has an unique characteristic into particular table. Information like size, nullable were missed before.
- Refactoring - some main Column methods names were changed.
- Generator improvements - Fixed problems with catalogs, prohibited names etc. Added massive generation of many catalogs/schemas. Some bugs has been tracked and fixed. A lot of new information are being printed.
- PlateBuffer became a regular target.
- AccessProtector has been greatly simplified and refactored. Applied to every target.
- RemoteTarget has been greatly simplified.
- Added manual single column generation.
- IdGenerator has been modified and simplified. Introduced a possibility to provide own in-code generator.
- Static classes Select, Delete, Insert, Update have been permanently removed. The only way to build queries is to use the methods embedded in the target.
- insert selects - to insert directly from select
- dual selects
- source code exposed on GitHub
- whole 'where' and 'having' methods were renamed. Method names indicates to relation between pointer and value. No need to import static Operator anymore.
- all kind of queries may start from QueryTarget, it will be a recommended way to build queries from now.
- new QueryTarget interface as a Target child - indicates target, which may be queried.
- introducing findOne(), findMany(), findFirst() - result type may be changed quickly, without changing the query. Method result() has been removed.
- Projection renamed to shorter and more intuitive Plate, ProjectionBox renamed to Plates, FlatProjection renamed to FlatPlate, FlatProjectionBox renamed to FlatPlates
- Upgraded and simplified in-memory buffer engines.
- Plates as QueryTarget (in-memory querying is possible over them)
- selects over special 'DUAL' table
- selects may contains another select as a function provider
- inserts may contains selects
- class package refactoring ,internal optimization, simplifying the code
- introducing experimental package with automatic join inside
- query translators were collected into a SqlQueryResolver class
- introducing QueryWhisperer - a big help into quick query building
- introducing FunctionWhisperer - eliminates static imports for functions
- columns() method into each entity class returns List<Column> type
- fixed EnhancedEntity default joinColumn() return value
- SQL set operators like union, except, intersect, minus were added
- simplified queries (Select.one and Select.many)
- Remote Targets (Server and Client)
- Projections
- Optimistic Concurrency Control
- ExtendedEntities
- Rewritten SQL Functions
- some interfaces names were changes, refactoring
- fixed errors
First public release.
Totally new ORM approach, JPA independent.
Complete library includes a generator.