# OSQL.class.php

Go to the documentation of this file.

    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
    00019     final class OSQL extends StaticFactory
    00020     {
    00024         public static function select()
    00025         {
    00026             return new SelectQuery();
    00027         }
    00028
    00032         public static function insert()
    00033         {
    00034             return new InsertQuery();
    00035         }
    00036
    00040         public static function update($table = null)
    00041         {
    00042             return new UpdateQuery($table);
    00043         }
    00044
    00048         public static function delete()
    00049         {
    00050             return new DeleteQuery();
    00051         }
    00052
    00056         public static function truncate($whom = null)
    00057         {
    00058             return new TruncateQuery($whom);
    00059         }
    00060
    00064         public static function createTable(DBTable $table)
    00065         {
    00066             return new CreateTableQuery($table);
    00067         }
    00068
    00072         public static function dropTable($name, $cascade = false)
    00073         {
    00074             return new DropTableQuery($name, $cascade);
    00075         }
    00076     }
    00077 ?>