Skip to content
Trevor DeVore edited this page Nov 21, 2018 · 1 revision

How SQL Yoga Represents "Objects"

SQL Yoga tries to make working with SQL databases in LiveCode easier by thinking about things in terms of objects. Things such as connections, tables, queries, and records are easier to interact with when we can set and get properties on them and associate certain behaviors with them. It is also handy to be able to pass objects around to different handlers that can act on them.

Representing Objects with Arrays

As of LiveCode 9.0 the LiveCode engine has no means of creating faceless objects like you would in object oriented languages.

SQL Yoga addresses the issue of not being to create objects by using LiveCode arrays to represent objects. Arrays in LiveCode are easy to create and work with and can be multi-dimensional. While not perfect, arrays provide enough flexibility to make it work.

If you inspect some of the object arrays that SQL Yoga creates you will notice that some keys are prefixed with the @ symbol. The @ symbol designates a special property that the SQL Yoga library uses in order to store certain information about the object.

Clone this wiki locally