-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API: Moved $allowed_operators config static to JSONBackend.
Updated comments.
- Loading branch information
Showing
3 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* DB backend for use with a Postgres RDBMS like JSON querying syntax. | ||
* JSONText database backend that encapsulates a Postgres-like syntax for JSON querying. | ||
* | ||
* @package silverstripe-jsontext | ||
* @subpackage models | ||
* @author Russell Michell <[email protected]> | ||
* @see {@link JSONBackend} | ||
* @see https://github.com/Peekmo/JsonPath/blob/master/tests/JsonStoreTest.php | ||
* @see http://goessner.net/articles/JsonPath/ | ||
* @see https://www.postgresql.org/docs/9.6/static/functions-json.html | ||
*/ | ||
|
||
namespace JSONText\Backends; | ||
|
@@ -17,6 +15,18 @@ | |
|
||
class PostgresJSONBackend extends JSONBackend | ||
{ | ||
/** | ||
* An array of acceptable operators for this backend. | ||
* | ||
* @var array | ||
* @config | ||
*/ | ||
private static $allowed_operators = [ | ||
'matchOnInt' => '->', | ||
'matchOnStr' => '->>', | ||
'matchOnPath' => '#>' | ||
]; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters