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
Copy file name to clipboardExpand all lines: README.md
+20-32Lines changed: 20 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ _Making the JDBC usage simpler and less verbose._
10
10
11
11
## Overview
12
12
13
-
JDBC is the basic API for accessing relational databases. Being basic makes it quite tedious to use directly. This lead to higher level abstractions like [JPA](https://docs.oracle.com/javaee/7/tutorial/partpersist.htm). Using a full-grown _Object Relational Mapper_ on the other side might be to heavy weight for many uses cases. _FacileJDBC_ tries to fill the gap by making the lowlevel JDBC access less verbose and tedious. SQL is still used as query language.
13
+
JDBC is the basic API for accessing relational databases. Being basic makes it quite tedious to use directly. This leads to higher level abstractions like [JPA](https://docs.oracle.com/javaee/7/tutorial/partpersist.htm). Using a full-grown _Object Relational Mapper_ on the other side might be to heavy weight for many uses cases. _FacileJDBC_ tries to fill the gap by making the low-level JDBC access less verbose and tedious. SQL is still used as a query language.
14
14
15
15
> The API of this library has been heavily influenced by the Scala [Anorm](https://playframework.github.io/anorm/) library.
16
16
@@ -470,7 +470,7 @@ final Transactional db = ds::getConnection;
470
470
471
471
The library is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
472
472
473
-
Copyright 2019-2021 Franz Wilhelmstötter
473
+
Copyright 2019-2023 Franz Wilhelmstötter
474
474
475
475
Licensed under the Apache License, Version 2.0 (the "License");
476
476
you may not use this file except in compliance with the License.
@@ -486,44 +486,32 @@ The library is licensed under the [Apache License, Version 2.0](http://www.apach
*[#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