X DevAPI User Guide

10.1 Expression Strings

Defining string expressions is straight forward as these are easy to read and write. The disadvantage is that they need to be parsed before they can be transfered to the MySQL Server. In addition, type checking can only be done at runtime.

MySQL Shell JavaScript Code

// Using a string expression to get all documents that
// have the name field starting with 'S'
var myDocs = myColl.find('name like :name').bind('name', 'S%').execute();

All implementations can use the syntax illustrated above.