db4o 5.0 with Native Queries
| Carl Rosenberger 17 Nov 2005 22:36 GMT | Page rating:  |
db4objects is proud to announce the release of version 5.0 of the
open source object database db4o. This release comes with
Native Queries, database queries that can be expressed with
pure Java syntax.
The benefits of using Native Queries:
- 100% compile time checked
Since all query code is written in Java (not in strings) all syntax
errors will be detected by the compiler.
- 100% object-oriented
Native Queries allow you to use the full power of Java in
queries. All constructs are legal: method calls, local variables,
overriding, overloading. You can operate against the public facade
of your classes (getters) or against the private implementation
(fields), as you like.
- 100% refactorable
Since queries are now an integral part of your application, you
can refactor all queries automatically with your development
environment.
- More Productive
Your IDE will help you to write Native Query expressions by
providing autocompletion.
- Fast
Under the hood db4o analyzes native query bytecode and converts
it to run against database indexes.
You are invited to evaluate Native Queries against your requirements
and experience the benefits.
Here is an example of a Native Query as an appetizer:
List <Product> products = db.query(new Predicate <Product>(){
public boolean match(Product product){
if(product.getLicense() == Licenses.GPL){
return true;
}
Float price = product.getPrice();
Vendor vendor = product.getVendor();
return price < 100
&& vendor.getName().startsWith("d")
&& vendor.getCountry() == Countries.USA;
}});
db4o is available for free under the GPL at:
http://www.db4o.com
Enjoy!
--
Carl Rosenberger
Chief Software Architect
db4objects Inc.
http://www.db4o.com
No comments at this time. Why not be the first?