X DevAPI User Guide

10.1 Expression Strings

Defining string expressions is straightforward 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. All implementations can use the syntax illustrated here, which is shown as 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();