intaro / hstore-extension
HStore 扩展包含 DBAL 类型 hstore 并注册 Doctrine 类型 hstore
v3.0.0
2023-01-26 11:28 UTC
Requires
- php: >=7.4 || >=8.0
Requires (Dev)
- cache/array-adapter: ^1.1
- doctrine/annotations: ~2.0
- doctrine/orm: ~2.0
- phpunit/phpunit: ^8.5
Suggests
- ext-hstore: *
README
PostgreSQL 模块 hstore
允许在单个 PostgreSQL 值中存储键/值对集合。更多信息请访问 此处。
HStore 扩展包含 DBAL 类型 hstore
并注册 Doctrine 类型 hstore
。
安装
要安装此库,请运行以下命令,您将获取最新版本
composer require intaro/hstore-extension
如果您想运行测试
./vendor/bin/phpunit
您可以在 config/hstore.yml 中找到使用 HStore 扩展的 Symfony2 示例配置。您只需将其包含在 config.yml
中即可
imports: - { resource: ../../vendor/intaro/hstore-extension/config/hstore.yml }
PHP 扩展
为了加速字符串的编码/解码,您可以在 ext/hstore
目录中安装 C 扩展。
要编译扩展,您必须安装 php-dev 软件包。
phpize ./configure make sudo make install
最后,在您的 php.ini
配置文件中启用扩展
extension = hstore.so