Code Monkey home page Code Monkey logo

sbql4j's People

Contributors

emil-wcislo avatar

Watchers

 avatar

sbql4j's Issues

groovy support

any plan/roadmap of having groovy language support 
(http://groovy.codehaus.org) 

Original issue reported on code.google.com by [email protected] on 22 Sep 2011 at 1:46

New feature idea

As far as I know the current version of SBQLJ does't make it possible to query 
relational databases. Of course, I'am aware of the technical difficulties in 
making a reasonable translator between SBQL and SQL (not to mention HQL), but I 
think I have a simple solution. The solution isn't perfect, but it's probably 
better than no database access at all.

The idea is based on two assumptions:
1) Developers should keep all their SQL code in stored procedures (database 
side). For example, below is a simple script for MySQL:

DELIMITER $$$

CREATE PROCEDURE get_events_for_category(categoryid int)
begin
    select * from event where eventcategoryid = categoryid;
end $$$

CREATE PROCEDURE get_services()
begin
    select * from services;
end $$$

DELIMITER ;

2) You develop a code generator which connects to the database using JDBC, 
reads metadata (names of procedures, names and types of their formal 
parameters, names and types of columns in the result). Based on this 
information you could generate stubs (in the form of classes or interfaces) for 
the Java compiler. The stubs would probably have to be stored on the disk prior 
to compilation, but you could also try to experiment with a more transparent 
solution. For example, store them (the stubs) in memory and perhaps adjust the 
class loader.

In this way you would be able to write something like this:

List<Product> expensiveInStockProducts = #{
    get_products() where unitsInStock > 0 and unitPrice > 3.00
};

Of course, this is rather lame, because selection ("where") would be evaluated 
on the client side, but the programmer should be aware of that (maybe that's 
what he wants). If server-side selection is necessary, the stored procedure 
would look like this:

CREATE PROCEDURE get_products_by_stock_and_price(unitinstock int, unitprice int)
begin
    select * from products where units > unitinstock and price > unitprice;
end;

and the client side accordingly:

List<Product> expensiveInStockProducts = #{ get_products_by_stock_and_price(0, 
3.00) };


It's just brainstorming, but I feel it has some potential. It's simple, quite 
powerful, easy to implement and doesn't compromise performance. Personally, I 
would prefer something like this to ORM. 


Regards

Original issue reported on code.google.com by [email protected] on 17 Nov 2010 at 2:26

Advanced Query Examples can be Trivially written in LINQ

What steps will reproduce the problem?
1. Compare the .s4j file with the .cs file
2. Substantiate this claim stated at the top of the file: "Some advanced 
queries which are difficult (or even impossible) to write in LINQ"

The provided examples of advanced queries are easy to implement in LINQ,
even without leveraging its more advanced operators such as joining on
synthesized keys.  


Original issue reported on code.google.com by [email protected] on 3 Dec 2013 at 7:46

Attachments:

build SBQL4J on MacOS

What steps will reproduce the problem?
1. svn checkout http://sbql4j.googlecode.com/svn/trunk/ sbql4j 
2. sbql4j/SBQL4J/make
3. ant build

What is the expected output? What do you see instead?

It should build. Instead, I get the following error:
BUILD FAILED
/Users/afeng/libs/sbql4j/SBQL4J/make/build.xml:377: The following error 
occurred while executing this line:
/Users/afeng/libs/sbql4j/SBQL4J/make/build.xml:746: Cannot locate bootstrap 
java: please set boot.java.home to its location

What version of the product are you using? On what operating system?
I just check out the code, and was trying to build it on MacOS with JDK 1.6:
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Nov 2011 at 2:26

Add maven support

Could you please add your library to global maven2 repo?

Original issue reported on code.google.com by illarion.kovalchuk on 5 May 2010 at 1:30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.