public static function select($type, $sql, $binds=null) {
	if (in_array($type, self::$types) == false) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('unknown select type');
	}
	
	$results = self::query($sql, $binds);
	return self::{'as_'.$type}($results);
}