public function compileFields($fields)
{
$statement = [];
foreach ($fields as $field) {
$method = 'compile' . ucfirst($field->type);
if (method_exists($this, $method)) {
if (!empty($map = $this->{$method}($field))) {
$statement[$field->name] = $map;
}
}
}
return $statement;
}