This commit is contained in:
lukaseder 2015-02-05 13:05:19 +01:00
commit f6d9c8dc85
5 changed files with 141 additions and 29 deletions

17
.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jOOQ</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -101,7 +101,7 @@ public class SQLiteDatabase extends AbstractDatabase {
.fetch(SQLiteMaster.NAME)) {
for (Record record : create().fetch("pragma table_info('" + tableName + "')")) {
if (record.getValue("pk", boolean.class)) {
if (record.getValue("pk", int.class) > 0) {
String columnName = record.getValue("name", String.class);
// Generate a primary key name

View File

@ -83,8 +83,8 @@ public class SQLiteTableDefinition extends AbstractTableDefinition {
// SQLite identities are primary keys whose tables are mentioned in
// sqlite_sequence
boolean pk = record.getValue("pk", Boolean.class);
boolean identity = pk && existsSqliteSequence() && create()
int pk = record.getValue("pk", int.class);
boolean identity = pk > 0 && existsSqliteSequence() && create()
.fetchOne("select count(*) from sqlite_sequence where name = ?", getName())
.getValue(0, Boolean.class);

View File

@ -592,37 +592,128 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
));
/* [trial] */
JooqLogger l = JooqLogger.getLogger(Constants.class);
String message;
message = "Thank you for using jOOQ " + Constants.FULL_VERSION;
/*
* So, you've found the piece of logic that displays our beautifully-crafted ASCII-art logo that
* we display in the log files to our jOOQ Open Source Edition and jOOQ Free Trial Edition users
*
* You probably came here to see if you can somehow turn it off, e.g. because you found this
* page here:
*
* http://stackoverflow.com/q/28272284/521799
*
* And yes! You can:
*
* a) turn off your logger for org.jooq.Constants
* b) set the -Dorg.jooq.no-logo=true property
* c) simply patch this file in your sources and rebuild jOOQ
* d) buy a commercial license
*
* Hint: While a) - c) work, d) is the right answer :-)
*
* But before you do any of a) - c), consider this. We give away this awesome software for free,
* and we'd love to continue giving it away for free, so all we would like to ask you is to
* continue to show your love and our brand to everyone involved in your software simply in the
* log files when you load jOOQ. Please don't remove our logo.
*
* Everytime someone removes our logo, god kills a kitten
*
* Some more ASCII-art to illustrate this:
*
* ---:-----------------------------------------------------------------------------------------
* ----------///::------------------------------------------------------------------------------
* ---------+yssso/-----------------------------------------------------------------------------
* :::-----:syyssso:--------------------------------------+oso:---------------------------------
* ::-----:oysooosss+----------------------------------:ooyyyys:--------------------------------
* :::----/sysoooooos+/------------------------------:/syysssso:.-------------------------------
* ::::---/yyyysooossyy/-::-------------------------:shyysooo++o:.---------------------:::--:--:
* ::::---:syhyyyyyyyyyyy/:--:-.-::/:::/:::-:::::-:oyhyssoo++//++.....------------------::::::::
* --------oyhhhdhhhhhyhh+`:+o+++sssssyossooooo/+oyhyssssso++/+o/`````..----::::::-:::::::::::::
* :------:oyhhdddddhhhyyo-.sshdysoyysyoossdhyyssyhyyyyyysoooos+-` ``..----:::::::::::::::::::
* :------/syhddddddhhhsso/:ooyhyhhhyyhhyhsdhhyoyyyyysyyyyyysss/`` ```-----::::::::::::::::::
* -------/shmmmddhhyyhsoo/+o+hdyhddhomyhhyhyhysssyhhyyyyyhhsoo:`` `..----:::::::::::::::::
* :------/yhmmmmho++syhyyhddmNNhmNmdhdyyhNdhddhsssyysyysshyyy+-.` `.-----::::::::--::::::
* -------+yhmNmdhyhhhydmhhmmNNNdNNNdmdddNNdmdddyys+++sysshhhhh``` `..-------------:::::::
* -------:yhNNmddddmmmhdhhddNNNdmNNmmhdNNdmmdhdhdhyy++ooyddhdh````` `..---------------::::::
* ------.:yhddhddmmmmdmddhddmNMNdmNNmNNNmdmdhhdddddhysoshdddmh.```` ````.------------------::::
* -----.`/yyyyhdmdhhhdmdhydmddNMNNNNmMNdddyyhhhhyhhhdhysyddmdy` ```..``..----------------------
* -----.-+syhhdddyyyhdmmysdMdshNNNNNNdshNmssyyhyyyyhddhsosssso ```...``..-------------::------
* :-----:oyhdddyysyyyhhdyohNyoshmmmNNo+hNh+ohdhysoosyyyys++/:: ```...```...-----------:-------
* :------odmdmdyssyyyyyysoshs+shhmdhh+/ydo+osssso++oosyhhsso/- ```.....```..------------------
* -----:-+hmNNmhhddmNNNNmdh+++syddhys++ooosooo++//::+oyhhhyys: ````....```..------------------
* -------:+ymNNNNoymNNNNNNMs++sshhyo+//smNmNmdhdhys/:+syhhhh+. `` ```...```.------------------
* ---------:ydhhdssdNMNNNMMms+osyyo+/+yNMNmNNmmNhohdhhdddmms. ``` `.--.```...----------------
* ----------oyysymdhdmmmNNNNhssssoo+/hmNMMNNNNNh+:oyyyhyyhs-` ``` ``.-.```...---------------
* --------:/ssssydmmhyoosyhNmysssoo+omdhhhdmddhsosys///+o/.` ```` `.::.``...---------------
* --------/osyydmyhmmdhysydmdhyysoooyNdo///+oshdhs+/://+/.` ```` `::.``...---------------
* ------.:osssyhhhhdddhyyyydddhhyyysyyhhsshhhhdyo+//+o+--.`` ` `::.````.---------------
* -----::oyhdhhhhyysssyyhhsdNNmmmdddy:oooooyyyyo+oss/:----` `` `::-````..--------------
* --..-:/oyhdmddddhysosyysoshmMMMNmho:oo++--//:/+/::::/oo+-` `` ``:::-.``..--------------
* ----:osyhddmNNNNNmmdosysssohNMNmy+/++///..-::+oo+//oyys/-` `.::/-.```..-------------
* ----:+ossyyyhmNNNMNNmhsyyyhhmNmdyssoso+::/+shddddhds+++:` `.-++/-` ``.-------------
* ---://+ssyhddddmNMMMMNddhsyhhdddhyyo+//+hhddhmmmmmddhyyo/-` `.-+o+:. ``.------------
* .-::/osshdddmmmmmNMMNNmddhyysssoooosyyhddddmmmNmmdhyysso+- `.-/oo+:-`` `..----------
* .-://+oyhhhhdddddNNNdhhhhddhyyyyyyhhdddddddmNhho/:.::::..`` `.-/+sso/:.` ``..---------
* .-://+syhhdmdddhdmNdoosyhddhhhhhhhhhddddhhhhy+/-.```````` ``.-:/+ooso+-`` ``..--------
* ..--:oydhhddddhhhhho-::+syhhhhhhyyhhhddhhyyso/----````` `.::/++osyso/.` ``..------
* ..-:+yhhhdhddhyyyyo:---::osyhhhyyyhhhhhhso/::-...```` ./ooooosyyys/-``` ``..-----
* `.-/oyyhdddddhyyyys/.----::+osyssyhhhyy+-..``..```` ./yyyhhyyyso/-``` ``..----
* ..-/oyyhhhdddhyyhhhy...-----:/ooossss+-.``....```` ./hdddhyysso/-..`` ``..---
* ..-/+oyyyyhhhhyyhdmy........--://+ooo-```.::::-`` `.:yhhhhyssso+//::.`` ``.---
* `.:+osyyyyhhhhhhyhmo...............+s+-....`.`:- ``.-:/oyyyyysso++//-...` ```..-
* ``:ooysyyhhhhhhhhhh/...............hmmdh+/--:`..` ``....--:/oooooso++/::::-`````..-
* ``:ssyyyhhhhhdddhdh+........--...``dmmmdsoo+/:.`` ``......-------:/+ossoo+/:``````.-
* ``/yysyhhyhhhddddmms......------..`shdddmdyss+.``.` ```.....--...-....:/syyyyso/-`````..
* ``+yyyyhhhhdddmNNNd+.....--------..-:sNNdmmddho/-ss: ```......---------.-/+shhhhhso/:.````.
* `.omdyyyhyhhdddNmh+---------::---..:/sdmmNNNNdhyhds-```.........-----------/+syhhhhyyoo:`````
* --:oshyhhhdhddmms:.-.------:::::---:/shhhhdmdyo+/:` ``..--------------:::--/+yyhhhhyyso+-` ``
* :-.`.ydmmdmmmmh/-...---------::----::+yhhhhhhyso:. ```...-----------:::::-:/+yhhhhhyyyss+- `
* ...``-/syoyyo:..........-------------:+ohhhdddhs/` `````...------::::::::-:/+yhhhhhhhhyys+```
* .....`..------...........-------------:/syhhhyo-`````````...----::--:::----:/oyhhdddhhhys+.``
* .......------............---------------:/+oo:-```````````.....--------------:+oyhdhhhho:-.`.
* --..-----:----------------------------------:-........`````````....-----------:/+osssso/-....
* :-------:::--------::--------:::---------.......------...````````...-----------::::::::------
*
* Thank you very much! If you absolutely must remove this logo, and can live with the guilt
* and shame, below is the system property that deactivates it.
*
* Cheers from the jOOQ Team.
*
* --------------------------------------------------
* DEAR USER, PLEASE READ THE ABOVE BEFORE PROCEEDING
*/
if (!Boolean.getBoolean("org.jooq.no-logo")) {
JooqLogger l = JooqLogger.getLogger(Constants.class);
String message;
/* [pro] xx
xxxxxxx x xxxxxx xxx xxx xxxxx xxx xx xxx xxxx xxxx x x xxxxxxxxxxxxxxxxxxxxxx x x xxxxx xxxxxxxxx
xx [/pro] */
message = "Thank you for using jOOQ " + Constants.FULL_VERSION;
/* [pro] xx
xxxxxxx x xxxxxx xxx xxx xxxxx xxx xx xxx xxxx xxxx x x xxxxxxxxxxxxxxxxxxxxxx x x xxxxx xxxxxxxxx
xx [/pro] */
l.info("\n " +
"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@ @@ @@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@ @@ @@ @@@@@@@@@@" +
"\n@@@@@@@@@@ @@@@ @@ @@ @@@@@@@@@@" +
"\n@@@@@@@@@@ @@ @@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" +
"\n@@@@@@@@@@ @@ @@@@@@@@@@" +
"\n@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@" +
"\n@@@@@@@@@@ @@ @@ @@@@ @@@@@@@@@@" +
"\n@@@@@@@@@@ @@ @ @ @@@@@@@@@@" +
"\n@@@@@@@@@@ @@ @@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@" +
"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" +
"\n@@@@@@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