public static function from($context, $tables, $as = null)
{
if ($tables instanceof BasicRule) {
$context->appendSql("FROM (" . $tables->context->sql . ')');
$context->params = array_merge($context->params, $tables->context->params);
} else {
$context->appendSql("FROM {$tables}");
}
if ($as) {
$context->appendSql("as {$as}");
}
}