You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-2
Original file line number
Diff line number
Diff line change
@@ -63,13 +63,13 @@ return [
63
63
...
64
64
65
65
'sybase' => [
66
-
'driver' => 'sqlsrv',
66
+
'driver' => 'sybasease',
67
67
'host' => env('DB_HOST', 'sybase.myserver.com'),
68
68
'port' => env('DB_PORT', '5000'),
69
69
'database' => env('DB_DATABASE', 'mydatabase'),
70
70
'username' => env('DB_USERNAME', 'user'),
71
71
'password' => env('DB_PASSWORD', 'password'),
72
-
'charset' => 'utf8',
72
+
'charset' => 'utf8', // Experimental yet, prefer use the `DB_CHARSET` and `APPLICATION_CHARSET`
73
73
'prefix' => '',
74
74
],
75
75
@@ -107,6 +107,22 @@ The file is usualy found in **/etc/freetds/freetds.conf**. Set the configuration
107
107
tds version = 5.0
108
108
```
109
109
110
+
## Configuring the charset between the database and the application
111
+
To configure the charset between the database and the application, add the fields `DB_CHARSET` and `APPLICATION_CHARSET` in `.env` file, see the following example:
112
+
113
+
```env
114
+
DB_CHARSET=CP850
115
+
APPLICATION_CHARSET=UTF8
116
+
```
117
+
## Configuring the cache
118
+
As the library consults table information whenever it receives a request, caching can be used to avoid excessive queries
119
+
120
+
To use the cache, add the fields `SYBASE_CACHE_COLUMNS` and `SYBASE_CACHE_COLUMNS_TIME` to the `.env` file, see the following example:
121
+
```dotenv
122
+
SYBASE_CACHE_COLUMNS=true
123
+
SYBASE_CACHE_COLUMNS_TIME=3600 # cache table information by `3600` seconds
124
+
```
125
+
110
126
## Setting to use numeric data type
111
127
112
128
In the migration file you must replace `use Illuminate\Database\Schema\Blueprint;` with `use Uepg\LaravelSybase\Database\Schema\Blueprint;`. See the following example:
0 commit comments