You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[#21](https://github.com/jenetics/facilejdbc/issues/21): Create `Ctor` instances from Record classes. It is now possible to create `Ctor` directly from `record` classes.
493
+
*[#23](https://github.com/jenetics/facilejdbc/issues/23): Implementation of `Stored` class.
494
494
```java
495
-
// Simple `Dctor` creation.
496
-
finalDctor<Book> dctor =Dctor.of(Book.class);
495
+
// Reading 'Link' objects from db.
496
+
finalList<Stored<Long, Link>> links = select
497
+
.as(LINK_PARSER.stored("id").list(), conn);
497
498
498
-
// Adapt the name conversion.
499
-
finalDctor<Book> dctor =Records.dctor(
500
-
Book.class,
501
-
component ->switch (component.getName()) {
502
-
case"author"->"primary_author";
503
-
case"isbn"->"isbn13";
504
-
default->Records.toSnakeCase(component);
505
-
}
506
-
);
499
+
// Printing the result + its DB ids.
500
+
links.forEach(System.out::println);
507
501
508
-
// Add additional columns.
509
-
finalDctor<Book> dctor =Records.dctor(
510
-
Book.class,
511
-
field("title_hash", book -> book.title().hashCode())
0 commit comments