**Introduction**
Crema Query Language is a high-level SQL dialect that allows to write queries using a standardised SQL-like language. Crema Query is implemented as a parser that translates syntax in that of the target RDBMS. It aims to be developer friendly.
**Example**
Query-ing using regular query strings
```
var regularQuery string
reqularQuery = “SELECT email, name FROM users ORDER BY name DESC”
res := crema.ExecuteQuery(reqularQuery)
```
while using Crema QL
```
var q *crema.Query
q = crema.Select("email", "name").From("users").OrderBy("name").Desc()
res := crema.ExecuteQuery(q.QueryString)
```
**CRUD Interface**
**1. Create Record**
Standard insert query
```
INSERT INTO users(email,name) VALUES('email@to.me' ,'My Name')
```
translated using Crema QL
```
tableName = "users"
col[0] = "email"
col[1] = "name"
val[0] = "email@to.me"
val[1] = "My Name"
q := crema.Insert(tableName).Columns(col).Values(val)
```
to execute the insertion
```
crema.ExecuteQueryRow(tx, q.QueryString)
```
**2, Read Record**
Standard read query
```
SELECT * FROM users
```
translated using Crema QL
```
tableName = "users"
q := crema.Select().All().From(tableName)
```
to execute the query
```
crema.ExecuteQuery(q.QueryString)
```
**3, Update Record**
Standard update query
```
UPDATE users SET name = 'New Name' WHERE email = 'email@to.me'
```
translated using Crema QL
```
tableName := "users"
newValue := "New Name"
email := "email@to.me"
q := crema.Update(tableName).Set().Equal("name", newValue).Where().Equal("email", email)
```
to execute the query
```
crema.ExecuteNonQuery(q.QueryString)
```
**4. Delete Record**
Standard delete query
```
DELETE FROM users WHERE email = 'email@to.me'
```
translated using Crema QL
```
tableName := "users"
email := "email@to.me"
q := crema.Delete().From(tableName).Where().Equal("email", email)
```
to execute the query
```
crema.ExecuteNonQuery(q.QueryString)
```