|
4 | 4 |
|
5 | 5 | /** |
6 | 6 | * @method void setDriver($args); |
| 7 | + * Database Sql driver name |
7 | 8 | * @method void setDsn($args); |
| 9 | + * The PDO connection parameter string, database server in the DSN parameters |
8 | 10 | * @method void setUser($args); |
| 11 | + * Database user name |
9 | 12 | * @method void setPassword($args); |
| 13 | + * Database password for the given user |
10 | 14 | * @method void setName($args); |
| 15 | + * Database name |
11 | 16 | * @method void setHost($args); |
| 17 | + * Host name or IP address |
12 | 18 | * @method void setPort($args); |
| 19 | + * TCP/IP port of PostgreSQL/MySQL |
13 | 20 | * @method void setCharset($args); |
| 21 | + * Database charset |
14 | 22 | * @method void setOptions($args); |
| 23 | + * The PDO array for connection options, MySQL connection charset, for example |
15 | 24 | * @method void setIsFile($args); |
| 25 | + * Check PDO for whether it is a file based database connection, for example to a SQLite |
| 26 | + * database file, or not |
16 | 27 | * @method void setToMssql($args); |
| 28 | + * If we want to convert Queries in MySql syntax to MS-SQL syntax. |
| 29 | + * Yes, there are some differences in query syntax. |
17 | 30 | * @method void setToMysql($args); |
| 31 | + * If we want to convert Queries in MySql syntax to MS-SQL syntax. |
| 32 | + * Yes, there are some differences in query syntax. |
18 | 33 | * @method void setPath($args); |
| 34 | + * The path to open an SQLite database |
19 | 35 | * |
20 | 36 | * @method string getDriver(); |
| 37 | + * Database Sql driver name |
21 | 38 | * @method string getDsn(); |
| 39 | + * The PDO connection parameter string, database server in the DSN parameters |
22 | 40 | * @method string getUser(); |
| 41 | + * Database user name |
23 | 42 | * @method string getPassword() |
| 43 | + * Database password for the given user |
24 | 44 | * @method string getName(); |
| 45 | + * Database name |
25 | 46 | * @method string getHost(); |
| 47 | + * Host name or IP address |
26 | 48 | * @method string getPort(); |
| 49 | + * TCP/IP port of PostgreSQL/MySQL |
27 | 50 | * @method string getCharset(); |
| 51 | + * Database charset |
28 | 52 | * @method string getOptions(); |
| 53 | + * The PDO array for connection options, MySQL connection charset, for example |
29 | 54 | * @method bool getIsFile(); |
30 | | - * @method bool getToMysql(); |
| 55 | + * Check PDO for whether it is a file based database connection, for example to a SQLite |
| 56 | + * database file, or not |
31 | 57 | * @method bool getToMssql(); |
| 58 | + * If we want to convert Queries in MySql syntax to MS-SQL syntax. |
| 59 | + * Yes, there are some differences in query syntax. |
| 60 | + * @method bool getToMysql(); |
| 61 | + * If we want to convert Queries in MySql syntax to MS-SQL syntax. |
| 62 | + * Yes, there are some differences in query syntax. |
32 | 63 | * @method string getPath(); |
| 64 | + * The path to open an SQLite database |
33 | 65 | */ |
34 | 66 | interface ConfigInterface |
35 | 67 | { |
36 | 68 | /** |
37 | 69 | * Setup Connections for each SQL database class |
38 | 70 | * |
39 | | - * @param string $driver |
40 | | - * @param string|array $arguments |
| 71 | + * @param string $driver - The vendor's SQL database driver name |
| 72 | + * @param array $arguments SQL connection parameters, in the following: |
| 73 | + *```js |
| 74 | + * [ |
| 75 | + * user, // The database user name. |
| 76 | + * password, // The database users password. |
| 77 | + * database, // The name of the database. |
| 78 | + * host, // The host name or IP address of the database server. Default is localhost |
| 79 | + * port // The database TCP/IP port. Default is: 5432 - PostgreSQL, 3306 - MySQL |
| 80 | + * ] |
| 81 | + *``` |
| 82 | + * for: **mysqli** - (`username`, `password`, `database`, `host`, `port`, `charset`) |
| 83 | + * - `charset` // The database charset, |
| 84 | + * Default is empty string |
| 85 | + * |
| 86 | + * for: **postgresql** - (`username`, `password`, `database`, `host`, `port`) |
| 87 | + * |
| 88 | + * for: **sqlserver** - (`username`, `password`, `database`, `host`, `convertMysqlToMssqlQuery`) |
| 89 | + * - `convertMysqlToMssqlQuery` // convert Queries in MySql syntax to MS-SQL syntax |
| 90 | + * Default is false |
| 91 | + * |
| 92 | + * for: **pdo** - (`dsn`, `username`, `password`, `options`, `isFile`?) |
| 93 | + * - `dsn` // The PDO DSN connection parameter string |
| 94 | + * - `options` // Array for setting connection options as MySQL |
| 95 | + * - `isFile` // File based databases like SQLite don't need |
| 96 | + * user and password, they work with path in the dsn parameter |
| 97 | + * Default is false |
| 98 | + * |
| 99 | + * for: **sqlite3** - (`filePath`, `database`) |
| 100 | + * - `filePath` // The path to open an SQLite database |
41 | 101 | */ |
42 | 102 | public static function initialize(string $driver = '', array $arguments = null); |
43 | 103 | } |
0 commit comments