First we need to create our (S)TQL statement. TQL is Transfers own scripting language written in Java and ColdFusion. The main difference over SQL is that you are referencing classes and properties from your Transfer.xml file (see above). So to run a "SELECT * FROM" the post_table our TQL would look like:
You can see here that in the query instead of using the table name after FROM we are using the Transfer Class post.Post. Next we use the TQL and create the query. Note at this point you are not running the statement against the database, you are just creating a TQL.query object.
SELECT * FROM post.Post Once we have the object returned we just need to pass it on to one of Transfers generated methods such as .readByQuery() or .ListByQuery()
That's it. Nothing really new hear and like I said you can get all of this from the documentation. There are some limits still to TQL, one of the is using TOP/LIMIT (see this thread). In my next post i'll go into passing values to the TQL statement and look at other methods that can effect how the TQL script is resolved by TransferQuick reference points: