Creates a DB command that can be used to execute this query.
public createCommand ( |
||
$db | the database connection used to execute the query. If this parameter is not given, the `elasticsearch` application component will be used. | |
return | the created DB command instance. |