Learn Eclipse Keyboard Shortcuts Easily

Disclaimer: Some users experienced this plugin to break their Eclipse Juno (see comments). Use at own risk! Using keyboard shortcuts can vastly increase your productivity. Instead of switching between keyboard and mouse all the times, trying to figure out where that mouse cursor is, left/right clicking your way through context menus nested several levels deep, … Continue reading Learn Eclipse Keyboard Shortcuts Easily

The IS DISTINCT FROM predicate

The SQL-1999 standard specifies a useful IS DISTINCT FROM predicate, that behaves slightly different from the regular not equal comparison predicate. Here is its simple definition: 8.13 <distinct predicate> Format <distinct predicate> ::= <row value expression 3> IS DISTINCT FROM <row value expression 4> <row value expression 3> ::= <row value expression> <row value expression … Continue reading The IS DISTINCT FROM predicate

Publicly available SQL standard documents

For your reference, here is a list of publicly available SQL standard documents. Some are very late draft versions, where the final version is closed source and has to be purchased from ISO or ANSI directly: SQL-92 http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt SQL:1999 http://web.cs.ualberta.ca/~yuan/courses/db_readings/ansi-iso-9075-2-1999.pdf SQL:2003 http://www.wiscorp.com/sql_2003_standard.zip SQL:2008 (preliminary) http://www.wiscorp.com/sql200n.zip The links were taken from here: http://wiki.postgresql.org/wiki/Developer_FAQ

How to get Oracle execution plans with Starts, E-Rows, A-Rows and A-Time columns

This can probably be found elsewhere as well, but here's a short wrap-up how to get the most out of your execution plans, quickly 1. Be sure the actual rows and time statistics are collected. You can do this with -- login as user sys alter system set statistics_level = all; 2. Execute your bad … Continue reading How to get Oracle execution plans with Starts, E-Rows, A-Rows and A-Time columns

A nice way of using jOOQ with Spring

This blog post is outdated. For a more up-to-date example of how to integrate jOOQ with Spring, please consider the relevant sections of the jOOQ manual! A nice way of using jOOQ with Spring was recently discussed on Stack Overflow by Adam Gent: http://adamgent.com/post/31128631472/getting-jooq-to-work-with-spring-correctly The essence of it was given here in this gist: package … Continue reading A nice way of using jOOQ with Spring

Throw checked exceptions like runtime exceptions in Java

How to throw a checked exception without catch block or throws clause in Java? Simple! public class Test { // No throws clause here public static void main(String[] args) { doThrow(new SQLException()); } static void doThrow(Exception e) { Test.<RuntimeException> doThrow0(e); } @SuppressWarnings("unchecked") static <E extends Exception> void doThrow0(Exception e) throws E { throw (E) e; … Continue reading Throw checked exceptions like runtime exceptions in Java

Alvor: Static SQL analysis in Strings passed to JDBC

I have recently discovered this nice Eclipse plugin here: http://code.google.com/p/alvor/ It evaluates String, StringBuilder, StringBuffer, CharSequence and many other types passed to JDBC method for subsequent execution. It doesn't do a bad job at this, even if it is in beta mode. The rate of false positives that I have experienced is around 20% for regular SQL statements, and … Continue reading Alvor: Static SQL analysis in Strings passed to JDBC