HSQLDB HSQLDB is an unique high performing, high quality Java based relational database which can be very easily extended with simple Java static functions. HSQLDB è un eccezionale rendimento elevato, di alta qualità a base di Java database relazionale che può essere facilmente esteso con semplici funzioni Java statica. Here we will see how you can easily extend the database capability with a real-life example. Qui vedremo come si può facilmente estendere le capacità del database con un esempio realistico.

I wanted to do a case-insensitive LIKE comparison, specifically get rows where the column data contains the target string. Volevo fare una distinzione tra maiuscole e SIMILE confronto, in particolare ottenere righe, dove la colonna di dati contiene la stringa di destinazione. The where clause using LIKE would be: “Column Name” LIKE ‘Target String’. La clausola di cui usando quale sarebbe il seguente: "Nome Colonna" come 'Target String'.

Unfortunately SQL LIKE is case sensitive. SQL SIMILE purtroppo è maiuscole e minuscole. A simple way to accomplish this would be write a static function to do the comparison. Un modo semplice per ottenere questo sarebbe scrivere una funzione statica di fare il confronto. He is the function I wrote in my Util.java file (a collection of static java utility functions) to do the comparison: Egli è la funzione che ho scritto nel mio Util.java file (una raccolta di statica java funzioni di utilità) a fare il confronto:

public static boolean containsMatch(String target, String search) { public static boolean containsMatch (string target, Stringa di ricerca) (
return target.toLowerCase().contains(search.toLowerCase()); ritorno target.toLowerCase (). contiene (search.toLowerCase ());
} )

To use it I executed the following SQL query: Per usarlo ho eseguito le seguenti query SQL:

select distinct "e-Biz Manager" from Sheet where "com.taragana.myexcel.Util.containsMatch"("e-Biz Manager", ‘emily’) selezionare distinti "e-Biz Manager" Foglio da dove "com.taragana.myexcel.Util.containsMatch" ( "e-Biz Manager", 'emily')

Note that I enclosed the function invocation in double quote. Notare che si è racchiusa la funzione invocazione in camera doppia citazione. The column name is enclosed in double quotes because it contains space. La colonna nome è racchiusa tra virgolette doppie perché contiene spazio. The actual data is enclosed in single quotes. I dati effettivi è racchiuso tra apici singoli.
Also note that I can shorten the name of the function invoked with an alias statement. Nota anche che posso abbreviare il nome della funzione invocata con un alias.

Isn’t this simplicity defined? Non è questa semplicità definite? I find HSQLDB an extremely versatile database which has served me over the years, highly recommended. HSQLDB trovo estremamente versatile banca dati che mi ha servito nel corso degli anni, altamente consigliato. And as for performance? E, per quanto riguarda le prestazioni? It beats any other database hands down including but not limited to MySQL, Oracle etc. Si batte qualsiasi altra banca dati mani giù incluso ma non limitato a MySQL, Oracle, ecc