Home > Developing Using CodeFluent Entities, Presentation > CodeFluent Query Language Overview

CodeFluent Query Language Overview


CodeFluent Query Language (CFQL) is a simple yet powerful language which allows developers to write stored procedures in their models. Therefore, CFQL is platform independent and its producers which will translate this query into an actual stored procedure.

The language itself is a mix of traditional SQL and object-oriented syntaxes (btw, the language is case insensitive):

<method> (<arguments>) [from <source>] [<where> <expression>] [<order by> <expression>]

Available methods are:

  • Load / loadone: creates a procedure to return one or multiple instances from the database,
  • Search: similar to load methods, however arguments are optional/nullable, supports wildcards (e.g. ‘*’), and the resulting SQL is built dynamically at run time in order to support as many optional parameters as you desire,
  • Count: return a number being the result of the count operation (uses the count SQL clause),
  • Delete: allows developers to delete batches of records from the persistence layer (and avoid doing deletes in a foreach)
  • Raw: allows developers to specify custom persistence code because CFQL does not intend to replace persistence code, so you can’t do everything with it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s