Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
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
sinan
laravel-mongodb
Commits
e4d74282
Commit
e4d74282
authored
Feb 20, 2017
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CS tweak
parent
4d0b5b73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
Connection.php
src/Jenssegers/Mongodb/Connection.php
+20
-13
No files found.
src/Jenssegers/Mongodb/Connection.php
View file @
e4d74282
<?php
namespace
Jenssegers\Mongodb
;
<?php
namespace
Jenssegers\Mongodb
;
use
Illuminate\Database\Connection
as
BaseConnection
;
use
MongoDB\Client
;
use
MongoDB\Client
;
class
Connection
extends
\Illuminate\Database\
Connection
class
Connection
extends
Base
Connection
{
{
/**
/**
* The MongoDB database handler.
* The MongoDB database handler.
...
@@ -44,14 +45,6 @@ class Connection extends \Illuminate\Database\Connection
...
@@ -44,14 +45,6 @@ class Connection extends \Illuminate\Database\Connection
$this
->
useDefaultSchemaGrammar
();
$this
->
useDefaultSchemaGrammar
();
}
}
/**
* @inheritdoc
*/
protected
function
getDefaultPostProcessor
()
{
return
new
Query\Processor
;
}
/**
/**
* Begin a fluent query against a database collection.
* Begin a fluent query against a database collection.
*
*
...
@@ -60,9 +53,7 @@ class Connection extends \Illuminate\Database\Connection
...
@@ -60,9 +53,7 @@ class Connection extends \Illuminate\Database\Connection
*/
*/
public
function
collection
(
$collection
)
public
function
collection
(
$collection
)
{
{
$processor
=
$this
->
getPostProcessor
();
$query
=
new
Query\Builder
(
$this
,
$this
->
getPostProcessor
());
$query
=
new
Query\Builder
(
$this
,
$processor
);
return
$query
->
from
(
$collection
);
return
$query
->
from
(
$collection
);
}
}
...
@@ -198,12 +189,28 @@ class Connection extends \Illuminate\Database\Connection
...
@@ -198,12 +189,28 @@ class Connection extends \Illuminate\Database\Connection
return
'mongodb'
;
return
'mongodb'
;
}
}
/**
* @inheritdoc
*/
protected
function
getDefaultPostProcessor
()
{
return
new
Query\Processor
();
}
/**
* @inheritdoc
*/
protected
function
getDefaultQueryGrammar
()
{
return
new
Query\Grammar
();
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
protected
function
getDefaultSchemaGrammar
()
protected
function
getDefaultSchemaGrammar
()
{
{
return
new
Schema\Grammar
;
return
new
Schema\Grammar
()
;
}
}
/**
/**
...
...
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