SQL

SQLdeLite New Release

Recent updates over the last couple months:

Version 2.170213.0 - February 13nd, 2017

  • Critical update to how parameters are ordered. Complex queries may have failed due to parameters not binding correctly.

Version 2.170122.0 - January 22nd, 2017

  • cubeSQL plugin will freeze up when trying to bind empty String/Text parameters. Offset this by binding Null if the String/Text field is blank.

Version 2.1611.70 - November 7th, 2016

  • The SQLdeLite.Record.CreateInsertStatement() method now escapes single quotes properly.
  • Int64's are handled property in 64-bit builds.
  • cubeSQL does required ordered parameters.
  • Introspection now uses the base type of the database object. This allows you to sub-class the database class without issue.

Version 2.1610.310 - October 31st, 2016

  • Fixed issue with SQLdeLite.Record.CreateInsertStatement() where strings with ' in it were not properly escaped breaking the query.

MIT Licensed @ GitHub: https://github.com/1701software/SQLdeLite

SQLdeLite version 2. iOS Compatible! Open Source.

SQLdeLite is an open source library that allows you to speed up your database development with Xojo.

Highlights:

  • Single drop in module that speeds up your development.
  • Automatically uses SQL prepared statements mitigating SQL injection attacks and speeding up database performance.
  • Quickly and easily create SQL queries by using variables representing the properties of your objects. These variables are converted to the bounded parameters in prepared statements.
  • No more string concatenation for your SQL!
  • Dynamic objects that allow for any number of properties without having to define each one in the IDE. Now it's much faster to handle your query parameters and results.
  • Built on top of the new Xojo framework. 
  • Full support for iOSSQLiteDatabase on iOS! You can use the same business logic between projects despite using different database backends.
  • Full support for all Xojo supported databases. Enable databases that require plugins by setting the appropriate constant to True (example: PLUGIN_MSSQL_ENABLED).
  • Full support for cubeSQL. Make sure to enable support by changing the PLUGIN_CUBESQL_ENABLED constant to True.
  • Valentina database is also supported by virtue of the SQLdeLite.ParameterizeSQL() method. This converts your SQL query into a Valentina compatible query with bound parameters.

The library does not expose any new database classes nor requires the usage of custom database adapters (as in "Active Record" from BKeeney Software). The module extends the built-in Xojo databases classes and provides you with two additional methods. These methods replace the default SQLSelect() and SQLExecute() methods for your database of choice.

Why use over ActiveRecord?

  • ActiveRecord can only load a record via it's primary key which is forced to be an integer. It has the ability to load an object from a RecordSet which SQLdeLite can also do automatically (see the Advanced Features topic below).
  • ActiveRecord is not available on iOS. SQLdeLite runs everywhere Xojo runs: Console, Desktop, Web, and iOS without any modifications. 
  • ActiveRecord requires you to use their database specific adapters. SQLdeLite extends the Xojo native databases .
  • ActiveRecord requires code generation using the commercial ARGen product or hand building your database classes. SQLdeLite can use classes or dynamic objects via SQLdeLite.Record.
  • SQLdeLite is HALF the size contained inside a single module.
  • SQLdeLite is built on top of the new Xojo framework and ready for the future.

=========================

Read more and download from GitHub at: https://github.com/1701software/SQLdeLite