mini\Database\DatabaseInterface abstract interface

Documentation

Database interface for the Mini framework

Provides a clean abstraction over database operations while maintaining the simple, ergonomic API that makes database work pleasant.

Methods (17)

Execute a SELECT query and return a composable Query

Execute query and return first row only as object

Execute query and return first column of first row

Execute query and return first column values as array

Execute a statement (INSERT, UPDATE, DELETE)

Get the last inserted row ID

Check if a table exists in the database

Execute a closure within a database transaction

Get the SQL dialect for this database connection

Quotes a value for safe use in SQL query strings

Quotes an identifier (table name, column name) for safe use in SQL

Delete rows matching a query

Update rows matching a query

Insert a new row into a table

Insert a row, or update if conflict on unique columns

Create a VirtualDatabase with shadowed tables

Get database schema as a TableInterface

Source

src/Database/DatabaseInterface.php:11-304