承接 ptx/laravel-doris 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ptx/laravel-doris

最新稳定版本:3.0.7

Composer 安装命令:

composer require ptx/laravel-doris

包简介

This laravel extension adds support for doris and starrocks to the query builder and eloquent.

README 文档

README

让drois和starrocks直接使用查询构造器和ORM
This laravel extension adds support for doris and starrocks to the query builder and eloquent.
另外有支持cte的版本请查看wukongdontskipschool/laravel-doris 暂未实现
There are also versions that support cte

Require

mysqli
PDO

Installation

composer require "Ptx/laravel-doris":"3.0.2"

Use

// config/database.php
// connections inside add

'doris' => [
    'driver' => 'doris',
    'url' => env('DORIS_DATABASE_URL'),
    'host' => env('DORIS_DB_HOST', '127.0.0.1'),
    'port' => env('DORIS_DB_PORT', '9030'),
    'database' => env('DORIS_DB_DATABASE', 'forge'),
    'username' => env('DORIS_DB_USERNAME', 'forge'),
    'password' => env('DORIS_DB_PASSWORD', ''),
    'charset' => env('DB_CHARSET', 'utf8mb4'),
    'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
    'prefix' => env('DB_PREFIX', ''),
    'strict' => env('DB_STRICT_MODE', true),
    'options' => [
        // 连接超时时间秒 Connection timeout time Second
        PDO::ATTR_TIMEOUT => 3,
        // 是否数值类型转字符串 Whether numeric type is converted to string
        PDO::ATTR_EMULATE_PREPARES => false
    ]
],

Lumen需额外注册 Lumen Additional registration required

// bootstrap/app.php
// add
$app->register(\Ptx\LaravelDoris\DatabaseServiceProvider::class);

备注 Remark

insert() 是不会返回id,需要自己获取
         It will not return the id, you need to get your own
delete() 影响的行数始终返回0
         The number of rows affected always returns 0
cursor() 不是真的游标,doris还是会一次性全部返回
         It's not a real cursor. doris will still return all at once

Versions

Laravel Package
12.x 3.0.x
11.x unknown
10.x 2.0.x
9.x 2.0.x
8.x 2.0.x
7.x unknown
6.x unknown
5.8 unknown
5.5–5.7 unknown

升级事项 Upgrade Notes

1.x 升级到 2.x

  • DB::connection('doris')->table($tableName)->get();
    元素由数组升级为和mysql相对应的对象结构
    The element is upgraded from an array to an object structure corresponding to mysql
  • 支持事务(支持的sql需要参考不同版本的doris)
    Support transaction (The supported sql needs to refer to different versions of doris)
  • 插入二进制时转为明文字符串
    Converts to plaintext string when inserting binary

统计信息

  • 总下载量: 316
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-23