From fea02f918e819a041f1eaeb5b0cec7b4c4344c4d Mon Sep 17 00:00:00 2001 From: Russell Michell Date: Wed, 3 May 2017 21:03:56 +1200 Subject: [PATCH] MINOR: Tweaked README and travis config to suit SS4+PHP7 --- .travis.yml | 23 ++++++++++++----------- README.md | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index fcf3c39..a2fcb0a 100755 --- a/.travis.yml +++ b/.travis.yml @@ -5,26 +5,28 @@ sudo: false language: php php: - - 5.4 - - 5.5 - 5.6 - 7.0 + - 7.1 env: - - DB=MYSQL CORE_RELEASE=3.2 + - DB=MYSQL CORE_RELEASE=4.0 matrix: include: - - php: 5.4 - env: DB=MYSQL CORE_RELEASE=3.1 - - php: 5.5 - env: DB=MYSQL CORE_RELEASE=3.2 - php: 5.6 - env: DB=PGSQL CORE_RELEASE=3.3 + env: DB=MYSQL CORE_RELEASE=4.0 - php: 5.6 - env: DB=PGSQL CORE_RELEASE=3.4 - allow_failures: + env: DB=PGSQL CORE_RELEASE=4.0 + - php: 7.0 + env: DB=MYSQL CORE_RELEASE=4.0 - php: 7.0 + env: DB=PGSQL CORE_RELEASE=4.0 + - php: 7.1 + env: DB=MYSQL CORE_RELEASE=4.0 + - php: 7.1 + env: DB=PGSQL CORE_RELEASE=4.0 + allow_failures: before_script: - composer self-update || true @@ -39,4 +41,3 @@ script: branches: only: - master - - develop diff --git a/README.md b/README.md index 98ff756..76bf4ab 100755 --- a/README.md +++ b/README.md @@ -10,25 +10,25 @@ JSON storage, querying and modification. ### SilverStripe 4 -* Use version master (or 2.x when available) -* PHP 5.6+,>=7.1 +* Use dev-master (or 2.x when available) +* PHP 5.6+, >=7.0 * SilverStripe Framework ^4.0@dev * SilverStripe CMS ^4.0@dev ### SilverStripe 3 * Use version 1.x -* PHP 5.4+,<7.0 +* PHP 5.4+, <7.0 * SilverStripe Framework 3.1+ * SilverStripe CMS 3.1+ ## Features -* Store JSON in a dedicated JSON-specific `DBField` subclass -* Query JSON data via simple accessors, Postgres-like operators or [JSONPath](http://goessner.net/articles/JsonPath/) expressions. -* Selectively return results of queries as JSON, Array or cast to SilverStripe `Varchar`, `Int`, `Float` or `Boolean` objects. -* Selectively update portions of your source JSON, using [JSONPath](http://goessner.net/articles/JsonPath/) expressions. -* Selectively convert selected CMS input field-data, into JSON and write to specific field(s) on your models. +* Store JSON "object-strings" in a JSON-specific `DBField` subclass. +* Query stored JSON via simple accessors: `first()`, `last()` & `nth()` or Postgres-like operators: `->`, `->>` & `#>` or even [JSONPath](http://goessner.net/articles/JsonPath/) expressions. +* Selectively return query-results as `JSON`, `Array` or cast to SilverStripe's `Varchar`, `Int`, `Float` or `Boolean` objects. +* Selectively update portions of stored JSON using [JSONPath](http://goessner.net/articles/JsonPath/) expressions. +* Selectively transform one or more CMS input fields, to write to a single JSON store. ## Introduction @@ -40,14 +40,14 @@ or [Postgres' JSON operators](https://www.postgresql.org/docs/9.5/static/functio Project scenarios where storing 10s of terse configuration parameters in separate database columns just seems crazy. -When all you wanted was a simple key / value store but didn't want to muck about with the overhead of two or more -datastores like an RDBMS together with MongoDB for example. +When all you wanted was a simple key / value store but didn't want to muck about with the overhead of an RDBMS _and_ a NOSQL DB. -That Postgres, MySQL, Oracle and MSSQL 2016 all have, or at time of writing, are planning to have, Database level JSON field-types. +That Postgres, MySQL, Oracle and MSSQL 2016 all have, or at time of writing, are planning to have, Database level JSON field-types. This module plugs the gap for users of RDBMS' +_without_ native JSON support, while offering the a convenient scaffold on top of which native JSON support could be built. ### Postgres -In Postgres both the `->` and `->>` operators act as string and integer key matchers on a JSON array or object respectively. The module +In Postgres both the `->` and `->>` operators act as string and integer key matchers on a JSON array or JSON object respectively. The module however treats both source types the same - they are after all *both JSON* so `->` is used as an **Integer Matcher** and `->>` as a **String Matcher** *regardless* of the "type" of source JSON stored. The `#>` **Path Matcher** operator can act as an object or a text matcher, but the module wishes to simplify things and as such the `#>` operator is *just a simple path matcher*.