00001 <?php 00002 /*************************************************************************** 00003 * Copyright (C) 2004-2007 by Konstantin V. Arkhipov * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU Lesser General Public License as * 00007 * published by the Free Software Foundation; either version 3 of the * 00008 * License, or (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 /* $Id: OSQL.class.php 4687 2007-12-09 18:57:18Z voxus $ */ 00012 00020 final class OSQL extends StaticFactory 00021 { 00025 public static function select() 00026 { 00027 return new SelectQuery(); 00028 } 00029 00033 public static function insert() 00034 { 00035 return new InsertQuery(); 00036 } 00037 00041 public static function update($table = null) 00042 { 00043 return new UpdateQuery($table); 00044 } 00045 00049 public static function delete() 00050 { 00051 return new DeleteQuery(); 00052 } 00053 00057 public static function truncate($whom = null) 00058 { 00059 return new TruncateQuery($whom); 00060 } 00061 00065 public static function createTable(DBTable $table) 00066 { 00067 return new CreateTableQuery($table); 00068 } 00069 00073 public static function dropTable($name, $cascade = false) 00074 { 00075 return new DropTableQuery($name, $cascade); 00076 } 00077 } 00078 ?>