Second preview release. Focusing on low-hanging performance improvements and basic feature completeness. This state of code is an important milestone in proving current approach as superior to that of casbah-mapper, in terms of performance and overall safety.
Notable changes include:
Re-wrote transformer chain creation code. Made better use of memoized type information, dramatically improved object inflation performance.
Added @Ignore and @Key annotations.
@Ignore, when stuck on a field, excludes it from Salat's consideration. The field won't be included in generated
DBObject-s. When encountered in
DBObject-s during object inflation, the data will be dropped on the floor. In any case, whether the key is present or not in a
DBObject, a default value is required. Best uesd with
Option[_]fields, where default value can be
@Keytakes one argument, a string, and will use that value as the field's key in each generated
DBObject. Data extraction from
DBObject-s will also happen using this key.
Forklifted almost verbatim casbah-mapper's timing spec, with the goal of comparing performance characteristics. Preliminary results show that Salat's deflation code is 2x as fast than casbah-mapper's corresponding functionality. Inflation is 15x faster than casbah-mapper.