📜  Phalcon层

📅  最后修改于: 2021-01-07 09:23:39             🧑  作者: Mango

菲尔康层

它为框架中的模型层提供动力。在目录Phalcon \ Db下可以找到它。它由用C编程语言编写的抽象层组成。

数据库适配器

Phalcon使用PDO_连接到数据库。它支持以下数据库引擎:

Class Description
Phalcon\Db\Adapter\Pdo\Mysql It is the most used relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases.
Phalcon\Db\Adapter\Pdo\Postgresql PostgreSQL is a powerful, open source relational database system. It provides reliability, data integrity, and correctness.
Phalcon\Db\Adapter\Pdo\Sqlite SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine

实作

 'localhost',
    'dbname'   => 'javatpoint',
    'port'     => 3306,
    'username' => 'siddharth',
    'password' => 'flash',
    'adapter'  => 'mysql',
];

$db = Factory::load($options);
?>

数据库方言

Phalcon用方言存储数据库引擎的特定详细信息。

Class Description
Phalcon\Db\Dialect\Mysql SQL specific dialect for MySQL database system
Phalcon\Db\Dialect\Postgresql SQL specific dialect for PostgreSQL database system
Phalcon\Db\Dialect\Sqlite SQL specific dialect for SQLite database system