Git Product home page Git Product logo

dbengine's Introduction

CommonPHP - Database Library

CommonPHP's Database Library is a toolkit for database interaction and management in PHP applications. It offers a comprehensive set of features for connecting to databases, objectifying queries, executing them, and handling results efficiently.

Features

  • Connection Management: Simplifies the setup and management of database connections.
  • Query Builder: Offers a fluent interface for constructing SQL queries including parameter management and dynamic query parts (SELECT * FROM {0} WHERE id=@id)
  • Type Conversion: Provides an extensible system for converting between PHP types and database types.
  • Exception Handling: Includes detailed exceptions for precise error handling in database operations.

Components

The library is structured into several key components, including the Connection Manager, Query Builder, and various type converters. It also defines interfaces and contracts for extendability, alongside a suite of exceptions for robust error management.

Requirements

Requires PHP 8.3 or newer and is built to integrate seamlessly with other CommonPHP libraries.

Installation

Use Composer to install:

composer require comphp/dbengine

Basic Usage

Initialize the Connection Manager and use the Query Builder to create and execute database queries. Type converters can be used to handle complex data types, and exceptions are thrown for any errors encountered during database operations.

Extending the Library

Custom type converters can be implemented by adhering to the provided interfaces, enhancing the library's flexibility and adaptability to different database systems and requirements.

Documentation

For detailed examples and usage instructions, refer to the source code and PHPDoc comments within each component.

Contributing

Contributions are welcome, following the contribution guidelines provided in the repository.

Testing

The library includes unit tests using PHPUnit. Instructions for running tests are provided, encouraging contributions to maintain high test coverage.

License

Licensed under the MIT License, promoting open and permissive usage in projects.

dbengine's People

Contributors

tlmcclatchey avatar

Stargazers

Ivan Kuraev 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.