1 | <?php |
||
23 | class MSSQLAzureDatabase extends MSSQLDatabase |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * List of parameters used to create new Azure connections between databases |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $parameters = array(); |
||
32 | |||
33 | public function fullTextEnabled() |
||
37 | |||
38 | public function __construct($parameters) |
||
42 | |||
43 | /** |
||
44 | * Connect to a SQL Azure database with the given parameters. |
||
45 | * @param array $parameters Connection parameters set by environment |
||
46 | * - server: The server, eg, localhost |
||
47 | * - username: The username to log on with |
||
48 | * - password: The password to log on with |
||
49 | * - database: The database to connect to |
||
50 | * - windowsauthentication: Not supported for Azure |
||
51 | */ |
||
52 | public function connect($parameters) |
||
57 | |||
58 | /** |
||
59 | * Connect to a database using the provided parameters |
||
60 | * |
||
61 | * @param string $database |
||
62 | */ |
||
63 | protected function connectDatabase($database) |
||
82 | |||
83 | /** |
||
84 | * Switches to the given database. |
||
85 | * |
||
86 | * IMPORTANT: SQL Azure doesn't support "USE", so we need |
||
87 | * to reinitialize the database connection with the requested |
||
88 | * database name. |
||
89 | * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee336288.aspx |
||
90 | * |
||
91 | * @param string $name The database name to switch to |
||
92 | * @param bool $create |
||
93 | * @param bool|int $errorLevel |
||
94 | * @return bool |
||
95 | */ |
||
96 | public function selectDatabase($name, $create = false, $errorLevel = E_USER_ERROR) |
||
114 | } |
||
115 |