Share

JoSQL (SQL for Java Objects)

Code

Programming Languages: Java

License: Apache License V2.0

Show:

What's happening?

  • Comment: sorting with null data

    Hi, JoSQL just uses the standard Java mechanisms for comparing objects (i.e. the Comparable interface) so it may be better to wrap the values that will contain the nulls in a custom function that will return a value (instead of null) that will force it to sort at the "top". It doesn't seem that the behavior for handling nulls is defined in the Comparable interface so a custom function is...

    2009-10-29 23:38:38 UTC by barrygently

  • sorting with null data

    Hi, I noticed if I sort a set of data with null inside, it will return a very funny order which it didnt put all the null data at the top most. Any ideas ? I need the null data there. Thanks.

    2009-10-29 05:54:21 UTC by nobody

  • sorting with null data

    Hi, I noticed if I sort a set of data with null inside, it will return a very funny order which it didnt put all the null data at the top most. Any ideas ? I need the null data there. Thanks.

    2009-10-29 02:36:10 UTC by nobody

  • The example to search files is wrong

    The example in JoSQL works fine finding names, but not using dates, because in the example it uses Dates as parameters, and really the attribute in the File class is a long, it works very well if the Dates are sent as long values.

    2009-09-14 21:18:14 UTC by nobody

  • Comment: LIKE returns 0 values in very specific case

    Thanks for reporting this Steve. This is fixed in version 2.2. It is caused by the % not being greedy when it does the match. To fix this in a source version of JoSQL (until the new version is released): Add method: public static int getLastMatch (String value, String search, int start) {.

    2009-05-06 11:53:36 UTC by barrygently

  • LIKE returns 0 values in very specific case

    In case when string value ends with same character which is inside string, using LIKE '%_searched_char' returns 0 values. For example: '240000025000004' and use LIKE '%4' return 0 values but use LIKE '%04' - return '240000025000004'. Steve.

    2009-04-29 09:55:09 UTC by nobody

  • Followup: RE: Group By with Count(*)

    Perfect, It did help.. Thanks Gary ..

    2009-04-14 06:59:43 UTC by praneshd

  • Followup: RE: Group By with Count(*)

    Hi Pranesh, The important thing to remember with JoSQL is that it does not have the concept of aggregation, this is useful in some contexts and not in others. The main issue to take into account is performance, with that in mind I'd write the query as: SELECT dept, @count FROM employee GROUP BY dept EXECUTE ON GROUP_BY_RESULTS count(:_currobj) count The execute on clause prevents...

    2009-04-13 23:42:35 UTC by barrygently

  • Group By with Count(*)

    How can use count(*) when when I do GROUP BY example: I have Object Employee with EmpName and department and I have db table Employee with emp_id and dept If I want to write normal sql to find how many employees are exist in each department then my normal sql would look like select dept , count(*) from employee group by dept how can I achieve this in josql Thanks in...

    2009-04-13 10:49:35 UTC by praneshd

  • Comment: order of statements matters when using bind variables

    Hi, Thanks for reporting this. This is due to the way that inner selects work. Because they cannot be inited until execution time the anonymous bind variable has not been allocated an internal name, so in effect (for the 2nd query) "johnnyTester" becomes bind variable 1 and then "key" becomes 2 and "val" becomes 3. For the first query it just so happens that the bind variables will be in...

    2009-03-31 00:19:11 UTC by barrygently

Our Numbers