SkillAgentSearch skills...

FoxQL

A fast, secure, and easy modern SQL library for PHP. supporting multiple database types: MySQL, PostgreSQL, SQLite, Sybase, Oracle, and MSSQL.

Install / Use

/learn @code3-dev/FoxQL
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center">

🦊 FoxQL

PHP Version License: MIT Composer Package GitHub

A fast, secure, and easy modern SQL library for PHP

Seamlessly work with PostgreSQL, MySQL, SQLite, Sybase, Oracle, and MSSQL databases

</div>

✨ Features

  • 🚀 Simple & Intuitive API - Write less, do more with a clean, fluent interface
  • 🔒 Secure by Default - Built-in protection against SQL injection
  • 🔄 Multi-Database Support - Works with PostgreSQL, MySQL, SQLite, Sybase, Oracle, and MSSQL
  • 🧩 Modular Design - Use only what you need with a lightweight core
  • 📊 Powerful Query Builder - Construct complex queries with ease
  • 🛠️ Schema Management - Create and modify database structures programmatically
  • 🏗️ Migration System - Laravel-inspired migrations for managing database schema changes

📦 Installation

Using Composer (Recommended)

composer require foxql/foxql

🚀 Quick Start

// Create a new FoxQL instance with MySQL connection
try {
    $db = new \FoxQL\FoxQL([
        'type' => 'mysql',        // Database type: mysql, pgsql, sqlite, etc.
        'database' => 'my_database',
        'host' => 'localhost',
        'username' => 'root',
        'password' => 'password',
        'charset' => 'utf8mb4',   // Character set
        'prefix' => 'prefix_'      // Table prefix (optional)
    ]);
    
    // Insert data
    $db->insert('users', [
        'name' => 'John Doe',
        'email' => 'john@example.com'
    ]);
    
    // Select data
    $users = $db->select('users', '*');
    print_r($users);
    
} catch (\PDOException $e) {
    echo "Connection failed: " . $e->getMessage();
}

🏗️ Database Migrations

FoxQL includes a powerful migration system for managing database schema changes:

// Create a table using the migration builder
$db->createTable('users', function($table) {
    $table->increments('id');
    $table->string('name', 100)->notNull();
    $table->string('email', 100)->notNull()->unique();
    $table->timestamps(); // Adds created_at and updated_at columns
});

// Run migrations from a directory
$migrations = $db->migrate('/path/to/migrations');

// See the complete example in examples/migration_example.php

📚 Documentation

Explore our comprehensive documentation for detailed usage instructions:

🔄 Core Operations

| Basic Operations | Data Manipulation | Schema Management | Raw SQL | | ---------------- | ----------------- | ----------------- | ------- | | Connection | Insert | Create Table | Query | | Select | Update | Drop Table | Execute | | Get | Delete | Action | | | Has | Replace | Migration | |

📊 Aggregation Functions

| Statistical | Mathematical | Other | | ----------- | ------------ | ----- | | Count | Sum | Rand | | Average | Max | | | | Min | |

📄 License

FoxQL is open-sourced software licensed under the MIT license.

👨‍💻 Developer

Related Skills

View on GitHub
GitHub Stars26
CategoryData
Updated1mo ago
Forks0

Languages

PHP

Security Score

90/100

Audited on Feb 14, 2026

No findings