[Previous] [Next] [Contents]

EasySQL is a thin layer between your applications and SQL databases. It has very easy to use simple standard interface from applications, which doesn't depend on exact database used. It's like ODBC in Windows world but much simpler and much easier to use in little-to-middle class applications.

EasySQL is run-time configured, and so you need not worry any more about which database you will use later. Even if you didn't hear about modern SQL database (or it doesn't exist) at compilation time later, at run-time, EasySQL will load appropriate driver and start using database you (or your application customer) want.

EasySQL takes care about connecting to databases, reconnecting in case of failures, retrying queries etc.

EasySQL is available through C++ class interface (primary API) or through plain C wrappers.

A simple C++ code, which uses EasySQL may look like this (this piece of code may look even simpler, but I want to show, how easy parameters may be transferred to query):

#include <stdio.h>
#include <easysql/easysql.h>

int
main(int ac, char *av[])
{ easysql sql("mydata");

  char const *order=(ac==2 && *av[2]=='n') ? "nickname" : "realname";
  esqlResult data=sql.query("SELECT nickname,realname "
                            "FROM aliases ORDER BY %s",order);

  esqlRow row;
  while((row=sql.row(data))!=NULL)
   printf("Nickname=`%s', Realname=`%s'",row[0],row[1]);

  return 0;
}

In that code `mydata' may use mSQL as a database today, MySQL tomorrow, and not yet available at compile time SuperHyperSQL year later - with the same binary without the need to recompile.


[Previous] [Next] [Contents]