All Projects → cycle → database

cycle / database

Licence: MIT license
Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to database

Sequelize
An easy-to-use and promise-based multi SQL dialects ORM tool for Node.js
Stars: ✭ 25,422 (+101588%)
Mutual labels:  sqlite, mssql
Iobroker.sql
Store history data in SQL Database: MySQL, PostgreSQL or SQLite
Stars: ✭ 37 (+48%)
Mutual labels:  sqlite, mssql
Vscode Sqltools
Database management for VSCode
Stars: ✭ 741 (+2864%)
Mutual labels:  sqlite, mssql
Medoo
The lightweight PHP database framework to accelerate the development.
Stars: ✭ 4,463 (+17752%)
Mutual labels:  sqlite, mssql
Rom Sql
SQL support for rom-rb
Stars: ✭ 169 (+576%)
Mutual labels:  sqlite, mssql
Pointblank
Data validation and organization of metadata for data frames and database tables
Stars: ✭ 480 (+1820%)
Mutual labels:  sqlite, mssql
Xorm
Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm
Stars: ✭ 6,464 (+25756%)
Mutual labels:  sqlite, mssql
database
Simple and easy go database micro framework
Stars: ✭ 12 (-52%)
Mutual labels:  sqlite, mssql
Directus
Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.
Stars: ✭ 13,190 (+52660%)
Mutual labels:  sqlite, mssql
Next
Directus is a real-time API and App dashboard for managing SQL database content. 🐰
Stars: ✭ 111 (+344%)
Mutual labels:  sqlite, mssql
Sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
Stars: ✭ 5,039 (+20056%)
Mutual labels:  sqlite, mssql
Heidisql
A lightweight client for managing MariaDB, MySQL, SQL Server, PostgreSQL and SQLite, written in Delphi
Stars: ✭ 2,864 (+11356%)
Mutual labels:  sqlite, mssql
Pgloader
Migrate to PostgreSQL in a single command!
Stars: ✭ 3,754 (+14916%)
Mutual labels:  sqlite, mssql
Phpmyfaq
phpMyFAQ - Open Source FAQ web application for PHP and MySQL, PostgreSQL and other databases
Stars: ✭ 494 (+1876%)
Mutual labels:  sqlite, mssql
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+72572%)
Mutual labels:  sqlite, mssql
Weapsy
ASP.NET Core CMS
Stars: ✭ 748 (+2892%)
Mutual labels:  sqlite, mssql
Dbbench
🏋️ dbbench is a simple database benchmarking tool which supports several databases and own scripts
Stars: ✭ 52 (+108%)
Mutual labels:  sqlite, mssql
Linq2db
Linq to database provider.
Stars: ✭ 2,211 (+8744%)
Mutual labels:  sqlite, mssql
Redaxscript
A modern, ultra lightweight and rocket fast Content Management System
Stars: ✭ 241 (+864%)
Mutual labels:  sqlite, mssql
database connections
⚙️Demonstration code to connect R on MacOS to various database flavors.
Stars: ✭ 18 (-28%)
Mutual labels:  mssql

Cycle DBAL

Latest Stable Version Build Status Scrutinizer Code Quality Codecov

Secure, multiple SQL dialects (MySQL, PostgreSQL, SQLite, SQLServer), schema introspection, schema declaration, smart identifier wrappers, database partitions, query builders, nested queries.

Documentation

Requirements

Make sure that your server is configured with following PHP version and extensions:

  • PHP 8.0+
  • PDO Extension with desired database drivers

Installation

To install the component:

$ composer require cycle/database

Example

Given example demonstrates the connection to SQLite database, creation of table schema, data insertion and selection:

<?php
declare(strict_types=1);

require_once "vendor/autoload.php";

use Cycle\Database\Config;
use Cycle\Database\DatabaseManager;

$dbm = new DatabaseManager(new Config\DatabaseConfig([
    'databases'   => [
        'default' => ['connection' => 'sqlite'],
    ],
    'connections' => [
        'sqlite' => new Config\SQLiteDriverConfig(
            connection: new Config\SQLite\FileConnectionConfig(
                database: 'runtime/database.db'
            ),
        ),
    ],
]));

$users = $dbm->database('default')->table('users');

// create or update table schema
$schema = $users->getSchema();
$schema->primary('id');
$schema->string('name');
$schema->datetime('created_at');
$schema->datetime('updated_at');
$schema->save();

// insert data
$users->insertOne([
    'name'       => 'test',
    'created_at' => new DateTimeImmutable(),
    'updated_at' => new DateTimeImmutable(),  
]);

// select data
foreach ($users->select()->where(['name' => 'test']) as $u) {
    print_r($u);
}

License:

MIT License (MIT). Please see LICENSE for more information. Maintained by Spiral Scout.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].