2017 © Pedro Peláez
 

library db

image

asgard/db

  • Wednesday, May 23, 2018
  • by leyou
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,037 Installations
  • PHP
  • 5 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Database

Build Status, (*1)

The DB package lets you manipulate the database, build SQL queries and manipulate the tables structure with Schema., (*2)

Installation

If you are working on an Asgard project you don't need to install this library as it is already part of the standard libraries., (*3)

composer require asgard/db 0.*

DB

To connect to the database and make SQL queries. See the documentation., (*4)

$rows = $db->query('SELECT * FROM news ORDER BY id DESC')->all();

DAL

To build SQL queries in a Object-Oriented manner. See the documentation., (*5)

$rows = $db-dal->from('news')->orderBy('id DESC')->all();

Schema

Build, modify and drop tables. See the documentation., (*6)

schema->table('news', function($table) {
    $table->addColumn('id', 'integer', [
        'length' => 11,
        'autoincrement' => true,
    ]);
    $table->addColumn('created_at', 'datetime', [
    ]);
    $table->addColumn('updated_at', 'datetime', [
    ]);
    $table->addColumn('title', 'string', [
        'length' => '255',
    ]);

    $table->setPrimaryKey(['id']);
});

Commands

List of commands that come with the DB package., (*7)

Contributing

Please submit all issues and pull requests to the asgardphp/asgard repository., (*8)

License

The Asgard framework is open-sourced software licensed under the MIT license, (*9)

The Versions

23/05 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michel Hognerud

13/05 2016

v0.3.1

0.3.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michel Hognerud

12/05 2016

v0.3.0

0.3.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michel Hognerud

13/06 2015

v0.2.0

0.2.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michel Hognerud

09/09 2014

v0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

by Michel Hognerud