Mandarine Query Language (MQL) serves as a helper to write queries. The main objective of MQL is to avoid the writing of SQL queries in your application's layer, and keep everything in a programatic environment. This is because, Mandarine.TS aims to respect SOLID principles & follow MVC patterns as well as making your code as simple and readable as possible.
SELECT*FROM MyTable WHERE airline = $1AND passengerName = $2# MyTable =Table of your model related to your repository # $1= airline parameter# $2= passengerName parameter
MQL Operators
Operators are keywords that will tell the lexical processor what type of operation is being requested at a SQL level.
Definers are keywords that will shape your final SQL query. Definers are used for the lexical processor to identify what type of query is being or will be built.
General definers
findAll: Select all rows
deleteAll: Delete all rows in entity
countAll: Count all rows in entity
findBy...: Creates & executes a select query
countBy...: Creates & executes a select count query
existsBy...: Creates & executes a verification statement