2017 © Pedro Peláez
 

silverstripe-module silverstripe-superquery

A tool for running queries in the CMS

image

unclecheese/silverstripe-superquery

A tool for running queries in the CMS

  • Wednesday, March 8, 2017
  • by unclecheese
  • Repository
  • 0 Watchers
  • 3 Stars
  • 15 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SilverStripe SuperQuery

The power of raw queries, with the elegance of the ORM., (*1)

, (*2)

Installation

$ composer require unclecheese/sivlerstripe-superquery, (*3)

Features

Run queries from within the CMS using the ORM, or SQL.

Use the _('YourClassName') as a replacement for YourClassName::get(), and use Symfony's expression language for the rest. (Spoiler: it's so dead simple, you already understand it)., (*4)

Examples:, (*5)

  • _('File').filter('Created:LessThan', '2015-01-01')
  • _('Member').filter({'Email:PartialMatch': 'hotmail.com', 'Active': true}).sort('Created DESC')
  • _('Event').filter('Approved', true).relation('Sponsors').sort('CompanyName ASC')
  • _('Event').filter('Approved', false).removeAll()

Choose which columns you want displayed

Click on the Columns... button in the footer to bring up a panel allowing you to customise the view., (*6)

Export data to CSV or JSON

Click on the export buttons to export the data in its current state in JSON or CSV., (*7)

Save frequently used queries

Click Save... to give the query a name and store it in the "saved queries" dropdown., (*8)

Hang it anywhere

The API is decoupled from the CMS, meaning the tool can be installed anywhere in your project., (*9)

Security

Needless to say, running raw queries against your database is serious business. All actions are restricted to ADMIN., (*10)

Development

The tool is built on ReactJS using the Webpack module builder. To do dev work: * Run npm run start in the module root directory. * Visit the admin/superquery URL directly in your browser. Navigating to it from with in the CMS will not properly load the dev server., (*11)

For realeases / Pull requests: * Run npm run build from the module root directory., (*12)

Troubleshooting

Ring Uncle Cheese., (*13)

The Versions

08/03 2017

dev-master

9999999-dev https://github.com/unclecheese/silverstripe-superquery

A tool for running queries in the CMS

  Sources   Download

BSD-3-Clause

The Requires

 

orm sql silverstripe queries