Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Database\Schema;
4
 
5
class SqlServerBuilder extends Builder
6
{
7
    /**
8
     * Create a database in the schema.
9
     *
10
     * @param  string  $name
11
     * @return bool
12
     */
13
    public function createDatabase($name)
14
    {
15
        return $this->connection->statement(
16
            $this->grammar->compileCreateDatabase($name, $this->connection)
17
        );
18
    }
19
 
20
    /**
21
     * Drop a database from the schema if the database exists.
22
     *
23
     * @param  string  $name
24
     * @return bool
25
     */
26
    public function dropDatabaseIfExists($name)
27
    {
28
        return $this->connection->statement(
29
            $this->grammar->compileDropDatabaseIfExists($name)
30
        );
31
    }
32
 
33
    /**
34
     * Drop all tables from the database.
35
     *
36
     * @return void
37
     */
38
    public function dropAllTables()
39
    {
40
        $this->connection->statement($this->grammar->compileDropAllForeignKeys());
41
 
42
        $this->connection->statement($this->grammar->compileDropAllTables());
43
    }
44
 
45
    /**
46
     * Drop all views from the database.
47
     *
48
     * @return void
49
     */
50
    public function dropAllViews()
51
    {
52
        $this->connection->statement($this->grammar->compileDropAllViews());
53
    }
54
 
55
    /**
56
     * Drop all tables from the database.
57
     *
58
     * @return array
59
     */
60
    public function getAllTables()
61
    {
62
        return $this->connection->select(
63
            $this->grammar->compileGetAllTables()
64
        );
65
    }
66
 
67
    /**
68
     * Get all of the view names for the database.
69
     *
70
     * @return array
71
     */
72
    public function getAllViews()
73
    {
74
        return $this->connection->select(
75
            $this->grammar->compileGetAllViews()
76
        );
77
    }
78
}