Fix nested list format
This commit is contained in:
parent
f85101fc67
commit
e896a66e0e
24
readme.md
24
readme.md
|
@ -240,19 +240,19 @@ A single row can be represented by 3 main Objects:
|
||||||
|
|
||||||
1. Array, where each column is mapped by index, starting at 0, array type of course determines the type returned
|
1. Array, where each column is mapped by index, starting at 0, array type of course determines the type returned
|
||||||
2. Map<String, ?>, where each column is mapped by name as key, and column value as value, mapped according to type
|
2. Map<String, ?>, where each column is mapped by name as key, and column value as value, mapped according to type
|
||||||
a. consider using the supplied com.moparisthebest.jdbc.util.CaseInsensitiveHashMap where case is ignored for keys
|
* consider using the supplied com.moparisthebest.jdbc.util.CaseInsensitiveHashMap where case is ignored for keys
|
||||||
3. Custom class Object, which attempts many different ways to map all returned columns to the class, if one of these
|
3. Custom class Object, which attempts many different ways to map all returned columns to the class, if one of these
|
||||||
is not a perfect match, an exception is thrown at runtime with QueryMapper, and a compile-time error happens with
|
is not a perfect match, an exception is thrown at runtime with QueryMapper, and a compile-time error happens with
|
||||||
JdbcMapper. This is an ordered list of how rows are mapped to class objects:
|
JdbcMapper. This is an ordered list of how rows are mapped to class objects:
|
||||||
1. If the class has a public constructor that takes a single java.sql.ResultSet parameter and nothing else, each row
|
1. If the class has a public constructor that takes a single java.sql.ResultSet parameter and nothing else, each
|
||||||
is sent in to create a new object, nothing else is done.
|
row is sent in to create a new object, nothing else is done.
|
||||||
2. If the class has a public constructor that takes the same number of arguments as columns returned, and all names
|
2. If the class has a public constructor that takes the same number of arguments as columns returned, and all names
|
||||||
match (order does not matter), this constructor is used. This method has some requirements though:
|
match (order does not matter), this constructor is used. This method has some requirements though:
|
||||||
a. Java 8+ only
|
* Java 8+ only
|
||||||
b. requires -parameters argument to javac for runtime with QueryMapper, or compiling against classes without
|
* requires -parameters argument to javac for runtime with QueryMapper, or compiling against classes without
|
||||||
source with JdbcMapper
|
source with JdbcMapper
|
||||||
c. Beware Java 8 only Bug ID [JDK-8191074](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8191074),
|
* Beware Java 8 only Bug ID [JDK-8191074](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8191074),
|
||||||
fixed in Java 9+ but will not be backported to 8
|
fixed in Java 9+ but will not be backported to 8
|
||||||
|
|
||||||
todo: explain how rows are mapped to POJOs
|
todo: explain how rows are mapped to POJOs
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue