Examples :

Simple Select Method

$orm = new SQLit($array);
$result = $orm->select(['id','name'])->query();

Select (*) example

$orm = new SQLit($array);
$result = $orm->select('*')->query();

Simple Where Query

$orm = new SQLit($array);
$result = $orm->select(['id','name','city'])
->where(['city'=>'California'])
->query();

Complete Where Query (Like)

$orm = new SQLit($array);
$result = $orm->select(['gender','name'])
  ->where([
    [
      'column' => 'gender',
      'value'  => 'female',
      'link'   => 'LIKE'
    ]
  ])
  ->query();

Complete Where Query (>)

$orm = new SQLit($array);
$result = $orm->select(['gender','name','id'])
  ->where([
    [
      'column' => 'id',
      'value'  => 8, // int|string
      'link'   => '>'
    ]
  ])
  ->query();

Order by `id` desc

$orm = new SQLit($array);
	$result = $orm->select(['gender','name'])
	  ->where([
	    [
	      'column' => 'name',
	      'value'  => 'Jhon',
	      'link'   => 'in' // Contains
	    ]
	  ])
	  ->order('id','desc') // Default asc
	  ->query();

Limit to 4 results

$orm = new SQLit($array);
$result = $orm->select(['gender','name'])
  ->where([
    [
      'column' => 'id',
      'value'  => '!=', // Not equal
      'link'   => 10
    ]
  ])
  ->limit(4)
  ->query();

Fetch Random data

$orm = new SQLit($array);
$result = $orm->select(['gender','name'])
  ->where([
    [
      'column' => 'id',
      'value'  => '!=', // Not equal
      'link'   => 5
    ]
  ])
  ->random()
  ->query();

Select distinct

$orm = new SQLit($array);
$orm->select('name')->distinct('name');
$result = $orm->query();

Separated Instance

$orm = new SQLit($array);
$orm->select(['id','name']);
$orm->where(['id'=>1]); // Like
$result = $orm->query();
Installation