Git Product home page Git Product logo

silverstripe-superquery's Introduction

SilverStripe SuperQuery

The power of raw queries, with the elegance of the ORM.

Installation

$ composer require unclecheese/sivlerstripe-superquery

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).

Examples:

  • _('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.

Export data to CSV or JSON

Click on the export buttons to export the data in its current state in JSON or CSV.

Save frequently used queries

Click Save... to give the query a name and store it in the "saved queries" dropdown.

Hang it anywhere

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

Security

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

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.

For realeases / Pull requests:

  • Run npm run build from the module root directory.

Troubleshooting

Ring Uncle Cheese.

silverstripe-superquery's People

Contributors

pingortle avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.