The query builder for OrientDB

Just a quick one, to inform you that I just released the beta-2 tag of the Orient library, which is a set of tools to use OrientDB in PHP.

In this tag, I’ve added an OO interface to build SQL queries for OrientDB, while some stuff of the binding has been refactored.

If you take a look at some tests ( like the one for the Select ) you’ll notice that everything can be done in Doctrine’s style, with a fluent interface:

Sample query
1
2
3
4
5
6
7
8
9
10
11
<?php

$this->select(array('name', 'username', 'email'), false)
      ->from(array('12:0', '12:1'), false)
      ->where('any() traverse ( any() like "%danger%" )')
      ->orWhere("1 = ?", 1)
      ->andWhere("links = ?", 1)
      ->limit(20)
      ->orderBy('username')
      ->orderBy('name', true, true)
      ->range("12:0", "12:1");

Since we don’t have integration tests to test the query builder with a real OrientDB instance ( we based the work on the docs ), I don’t encourage you to use the QB now: this post is just a way to tell you that things are going the right way.

Our next step is doing integration tests, so you will finally be able to use the QB in production, and starting to work on the Object Graph Mapper.


Hi there! I recently wrote an ebook on web application security, currently sold on leanpub, the Amazon Kindle store and gumroad.

It contains 160+ pages of content dedicated to securing web applications and improving your security awareness when building web apps, with chapters ranging from explaining how to secure HTTP cookies with the right flags to understanding why it is important to consider joining a bug bounty program.

Feel free to skim through some of the free chapters published on this blog and, if the content seems interesting enough to you, grab a copy on leanpub, the Amazon Kindle store, gumroad or simply checkout right down below!

Buy the Web Application Security ebook for $6.99

In the mood for some more reading?

...or check the archives.