Skip to content

Migrating from SQL Yoga 1x

Trevor DeVore edited this page Dec 20, 2018 · 3 revisions

Migrating from SQL Yoga 1.x

While the APIs between SQL Yoga 1 and SQL Yoga 2 are very similar, there are some differences and changes that you should be aware of. This document explains what each of the differences are.

Error Handling

Review the Error Handling document which describes how errors are handled with SQL Yoga. Almost all SQL Yoga handlers will only throw errors as the errors are either bad values, incorrect configuration, or a broken database connection.

Commands that are now functions

sqlquery_currentRowToArray, sqlquery_retrieveAsData, and dbconn_retrieveQueryAsData were commands in SQL Yoga 1. In SQL Yoga 2 they are now functions.

Table Behaviors

In SQL Yoga 1 table behaviors were stored in a button that was assigned to the table objects behavior property of the Database object. The format for a function that defined a custom property looked like this:

tableobj.get.[TABLE_NAME].[PROPERTY_NAME_WITHOUT_SPACES]

In SQL Yoga 2 table behaviors are stack with the following naming convention:

[TABLE_NAME] table behavior

A function that defines a custom property looks like this:

[TABLE_NAME]_get[PROPERTY_NAME_WITHOUT_SPACES]

See the Table Behaviors page for more information.