Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
1fb70a85
Commit
1fb70a85
authored
Sep 29, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up sqlite connector.
parent
7018b85b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
sqlite.php
laravel/database/connectors/sqlite.php
+8
-0
No files found.
laravel/database/connectors/sqlite.php
View file @
1fb70a85
...
...
@@ -12,14 +12,22 @@ class SQLite extends Connector {
{
$options
=
$this
->
options
(
$config
);
// SQLite in-memory databases only live for the lifetime of the current request, and it
// is impossible to create two connections to the same in-memory database.
if
(
$config
[
'database'
]
==
':memory:'
)
{
return
new
PDO
(
'sqlite::memory:'
,
null
,
null
,
$options
);
}
// We will check for the database in the default storage directory for the application.
// Typically, this directory holds all of the SQLite databases for the application.
elseif
(
file_exists
(
$path
=
DATABASE_PATH
.
$config
[
'database'
]
.
'.sqlite'
))
{
return
new
PDO
(
'sqlite:'
.
$path
,
null
,
null
,
$options
);
}
// If we still haven't located the database, we will assume the given database name
// is a fully qualified path to the database on disk and attempt to load it.
elseif
(
file_exists
(
$config
[
'database'
]))
{
return
new
PDO
(
'sqlite:'
.
$config
[
'database'
],
null
,
null
,
$options
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment