Coder Social home page Coder Social logo

q-file's Introduction

📝 Q-File!

Query File is basicaly a lightweight PHP class for queries (retrieve/select/where/order) custom data from a flat file. File is pretty to learn, not like JSON, or ARRAY, or SQL, all level of developers can learn easy that type of files.

Installation

Composer

Install with a command:

composer require fjonathan/q-file

Configuration

Buil the 'table' for using data to output and filter. Create a file like table.ay and build your own custom data

That's a example:

new "groups"

    (Google)
        [id: 1]

    (Whatsapp)
        [id: 2]

new "contact_list"

    (Jean Doe)
        [group: 2]
        [email: [email protected]]
        [avatar: user1.png]
        [address: 2722 Retreat Avenue]
        [city: Los Angeles]
        [phone: 562-567-3643]

    (Michel Doe)
        [group: 1]
        [email: [email protected]]
        [avatar: user2.png]
        [address: 577 Carolina Avenue]
        [city: Fort Collins]
        [phone: 808-933-9356]

Usage

Init package to starting using it

use File\Q;
$f = new Q;
$table = 'table.ay';

Return all data organized by keys

$data = $f
        ->table($table)
        ->record();

Options

These light class has many options to filter data, like:

  • searchAll - search by primary table content - ->searchAll('groups')
  • searchby - search by key group - ->searchBy('contact_list', 'group', 1)
  • orderBy - order by asc/desc the results data -> orderBy('id', 'ASC')

Notes

This tool has been retrieved from an old project, and may not be constant updates, so use with care.

q-file's People

Contributors

fj-onathan avatar

Stargazers

DΛVID avatar

Watchers

James Cloos 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.