PHPackages                             yangweijie/think-orm-kdb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. yangweijie/think-orm-kdb

ActiveLibrary

yangweijie/think-orm-kdb
========================

人大金库驱动 for think-orm

v1.0.0(1y ago)181Apache-2.0PHPPHP 5.6 |7.2

Since Jul 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/yangweijie/think-orm-kdb)[ Packagist](https://packagist.org/packages/yangweijie/think-orm-kdb)[ RSS](/packages/yangweijie-think-orm-kdb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

think-orm-kda
=============

[](#think-orm-kda)

人大金仓 驱动 for think-orm

安装
--

[](#安装)

### 目前win只有 7.2 和 5.6 两个版本

[](#目前win只有-72-和-56-两个版本)

`v9r1_pdo_kdb_win.zip`

找到nts （对应本地php thread safe）的复制到ext里 改 `php.ini`

```
extension=php_pdo_kdb.dll
```

php -m 后 如果 提示以下错误：

```
PHP Warning:  PHP Startup: Unable to load dynamic library

```

则需要把数据库安装目录下的D:\\soft\\Kingbase\\ES\\V9\\Server\\bin中的dll文件和D:\\soft\\Kingbase\\ES\\V8\\jre\\bin中的dll文件都拷贝至C:\\Windows\\System32目录下。

框架配置
----

[](#框架配置)

`config/database.php`中配置

```
'default'='kdb',
'kdb'=>[
    'type'=>'kdb',
    'hostname'=>'localhost',
    'hostport'=>54321,
    'username'=>'sysdba',
    'password' => 'sysdba',
    'database'=>'blog',
    'charset' => Env::get('database.charset', 'utf8'),
    'prefix' => 'dp_',
]
```

兼容性
---

[](#兼容性)

### `find_in_set`

[](#find_in_set)

参见src/connector/kdb.sql

### json

[](#json)

json 函数必须将字段设置为json 或 jsonb

json\_set 函数没有 所以

```
Test::json(['content'])->where('id', 1)->update([
    'content->nickname'=>'流年2'
]);
```

这种写法更定json字段里单路径 不支持

### 主键自增

[](#主键自增)

[添加序列 字段设默认值来实现](https://blog.csdn.net/lty13142/article/details/121634249)

数据库管理和迁移
--------

[](#数据库管理和迁移)

### navicat

[](#navicat)

直接以pgsql 方式可以连接

参考
--

[](#参考)

[KingbaseES与MySQL的兼容性说明 ](https://help.kingbase.com.cn/v8/development/develop-transfer/kes-vs-mysql/index.html)

难点
--

[](#难点)

乱码？ 未复现，尝试 在会话里set names 成功

todo
----

[](#todo)

\[\] 不兼容函数测试

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0b5f090a9bb92727e9c2e8281d05c2da5f2f9bf66cf1811714a9ffc0e383325?d=identicon)[yangweijie](/maintainers/yangweijie)

---

Top Contributors

[![yangweijie](https://avatars.githubusercontent.com/u/1614114?v=4)](https://github.com/yangweijie "yangweijie (4 commits)")

### Embed Badge

![Health badge](/badges/yangweijie-think-orm-kdb/health.svg)

```
[![Health](https://phpackages.com/badges/yangweijie-think-orm-kdb/health.svg)](https://phpackages.com/packages/yangweijie-think-orm-kdb)
```

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[topthink/framework

The ThinkPHP Framework.

2.8k3.2M1.3k](/packages/topthink-framework)[zoujingli/thinkadmin

Application Development Framework

2.3k12.0k](/packages/zoujingli-thinkadmin)[saithink/saiadmin

webman plugin

2709.9k1](/packages/saithink-saiadmin)[zoujingli/think-library

Library for ThinkAdmin

8569.8k17](/packages/zoujingli-think-library)[jaguarjack/catchadmin

The CatchAdmin Background management

8962.6k](/packages/jaguarjack-catchadmin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
