Skip to content

Commit

Permalink
Update docs #577
Browse files Browse the repository at this point in the history
  • Loading branch information
timowest committed Nov 30, 2013
1 parent bc47130 commit 8760518
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion querydsl-docs/src/main/docbook/en-US/content/tutorials/sql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,55 @@
<row>
<entry>exportForeignKeys</entry>
<entry>export foreign keys (default: true)</entry>
</row>
</row>
<row>
<entry>customTypes</entry>
<entry>Custom user types (default: none)</entry>
</row>
<row>
<entry>typeMappings</entry>
<entry>Mappings of table.column to Java type (default: none)</entry>
</row>
<row>
<entry>numericMappings</entry>
<entry>Mappings of size/digits to Java type (default: none)</entry>
</row>
</tbody>
</tgroup>
</table>

<para>Custom types can be used to register additional Type implementations:</para>

<programlisting language="xml"><![CDATA[
<customTypes>
<customType>com.mysema.query.sql.types.InputStreamType</customType>
</customTypes>
]]></programlisting>

<para>Type mappings can be used to register table.column specific user types:</para>

<programlisting language="xml"><![CDATA[
<typeMappings>
<typeMapping>
<table>IMAGE</table>
<column>CONTENTS</column>
<type>com.mysema.query.sql.types.InputStreamType</type>
</typeMapping>
</typeMappings>
]]></programlisting>

<para>Numeric mappings can be used to customize the mappings for the SQL numeric type:</para>

<programlisting language="xml"><![CDATA[
<numericMappings>
<numericMapping>
<size>1</size>
<digits>0</digits>
<javaType>java.lang.Byte</javaType>
</numericMapping>
</numericMappings>
]]></programlisting>


</sect2>

Expand Down

0 comments on commit 8760518

Please sign in to comment.