Skip to content

Commit 39fb4f2

Browse files
committed
IHF: New db_is_sqlite helper added.
1 parent d2e32e4 commit 39fb4f2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Provides Laravel-specific and pure PHP helper functions.
4141
- [call_in_background](#call_in_background)
4242
4343
- [Database](#database)
44+
- [db_is_sqlite](#db_is_sqlite)
4445
- [db_is_mysql](#db_is_mysql)
4546
- [db_mysql_now](#db_mysql_now)
4647
- [db_mysql_variable](#db_mysql_variable)
@@ -178,9 +179,19 @@ call_in_background('report:monthly subscriptions', 'sleep 0.3');
178179
179180
## Database
180181
182+
#### `db_is_sqlite()`
183+
184+
Checks if default database connection driver is `sqlite` or not:
185+
186+
```php
187+
if (db_is_sqlite()) {
188+
// sqlite-specific code here
189+
}
190+
```
191+
181192
#### `db_is_mysql()`
182193
183-
Checks if default database connection is `mysql` or not:
194+
Checks if default database connection driver is `mysql` or not:
184195
185196
```php
186197
if (db_is_mysql()) {

0 commit comments

Comments
 (0)