forsuredbcompiler is Annotation processor for the forsuredb project that handles code and resource generation. As the central part of the forsuredb project, it is one of libraries necessary for forsuredb to work. See the forsuredb documentation website for more details.
| Gradle Version | forsuredb compiler version |
|---|---|
| <= 3.x | 0.11.0 |
| >= 4.0 | 0.11.1 or greater |
- Float and float datatype support
- BigInteger datatype support
- Removed transitive dependency in forsuredbapi on Gson
- dbinfo models split into separate library . . . pulled in transitively--you don't have to worry about it unless you're writing a plugin for forsuredb
- gson adapters for dbinfo models (forsuredbmodels-gson library): depend upon this library if you use Gson
- jackson serializer/deserializers for dbinfo models (forsuredbmodels-jackson library): depend upon this library if you use Jackson
- moshi adapters for dbinfo models (forsuredbmodels-moshi library): depend upon this library if you use Moshi
- Completely non-reflective Getter classes (note that reflection is still used to instantiate objects in document store tables--so do not obfuscate those class names)
- Completely non-reflective Setter classes (note that the class name of the serialized object is still stored as a string in the database--so do not obfuscate those class names)
- Non-Android Java integration via JDBC (forsuredbjdbc)
- forsuredbjdbc example application for manual testing
- arbitrary-depth document store indices
- You can index any document store table by an arbitrarily deeply nested field using the
documentValueAccessproperty of the@FSColumnannotation. See the javadocs for more info.
- You can index any document store table by an arbitrarily deeply nested field using the
- Version and type-awareness for static data
- For each version of the database, you can set static data to get inserted with the schema at that version
- Fixed SQL generation for limit/offset queries
- Started a documentation website: http://forsuredb.org
- Fixed bug where adding a unique column after adding the column for the first time kept generating new, equivalent migration json files
- Fixed bug where
@FSDefaultcontaining a single-quote character failed to generate the database - Added annotation processor options prefixed with
forsuredb.--you don't have to worry about this if you use the forsuredb gradle plugin
- Pagination of records via first/last method on the
Finderclass
- Removed dependency on Guava
- Added composite key support. Now you can create composite primary and foreign keys.
- Fix issue wherein you had to join to another table in order to do a DISTINCT projection.
- You can now narrow down the columns returned by any query by calling the
Findermethodscolumns(String...)ordistinct(String...). Callingdistinct(String...)will query for distinct values. Note that if you call either of these methods, then your table API will contain methods that are invalid for theRetrieverthat gets returned when you call theResolver.get()method.
- varargs argument when you want to query for different exact values of the same column. Previously, you had to store an intermediate reference to a Finder class, which, based upon the way resolvers nest, could be really difficult to find the correct type to reference.
- You can now pass multiple values to exact match methods in the case where you want to create something like:
SELECT * FROM table1 JOIN table2 ON table1._id = table2.table1_id WHERE (table1.column = 1 OR table1.column = 10 OR table1.column = 100) AND (table2.column = 2 OR table2.column = 20 OR table2.column = 200);- more efficient Resolver class generation
- breaks API for your platform's use because the FSJoin class has changed.
- More robust querying API for finding/ordering by columns of joined tables.
- Generated Resolver classes are now abstract and have their own
Baseclass declaration.
- You can call
find()/orderBy()methods on resolvers for joined tables. - There is no more
RelationalResolverclass--it was unnecessary. - Order sometimes matters when performing a query
- You can call the join methods and
find()/orderBy()methods to switch contexts in any order.
- Full separation from any DBMS by means of a DBMSIntegrator plugin. Use forsuredbplugin-0.4.0 in order to supply the correct class to the compiler via the forsuredb.dbmsIntegratorClass property in your build.gradle file.
- There was a pretty big problem when switching contexts between adding clauses to your query in the generated querying API. The
andFinally()method is kind of misleading because it could appear several times. This has been changed tothen()in an attempt to make things less confusing. If you're upgrading, you'll have to change allandFinally()methods tothen()
- Support for any kind of serialization you want (either to
Stringorbyte[]), using whatever library you want or your own idea of what serialization should be. - In order to take advantage of this, you should use forsuredbplugin 0.3.2 or greater
- Support for custom
Gsonobjects by means of a plugin defined by theFSJsonAdapterFactoryinterface. You must use forsuredbplugin 0.3.1 or greater and add theresourcesDirectoryandfsSerializerFactoryClassproperties to theforsuredbgradle extension (or really know what you're doing writing Java plugins).
- Added doc store feature that stores objects as JSON using
Gson. Instead of extendingFSGetApito define your table's schema, extendFSDocStoreGetApiand give it a parameter that is the most basic possible object that will get stored in this table. Additionaly, define aClassfield calledBASE_CLASSwith the class that you used to parameterize theFSDocStoreGetApiextension.
FSColumnannotation now has searchable and orderable properties in order to tell the compiler whether to generate the order-by and finder methods for a column in the fluent querying api. Setting these properties tofalsewill cause the compiler to not generate the order by and finder methods associated with the column.
- Split into two modules: compiler and api
- No functional changes, but a lot of the cruft that was getting compiled into projects will now be removed
- No longer compile lombok into the compiler in order to avoid pulling in a bunch of stuff that is not needed