beliy/yii2-cassandra-cql 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

beliy/yii2-cassandra-cql

Composer 安装命令:

composer require beliy/yii2-cassandra-cql

包简介

A Cassandra CQL3 client wrapper over phpcassa for Yii 2

README 文档

README

Phpcassa has been deprecated and will no longer be supported! Please use https://github.com/datastax/php-driver

yii2-cassandra-cql

A Cassandra CQL3 client wrapper over phpcassa for Yii 2

Provides object oriented access to Cassandra using CQL3 in a familiar Yii Style. This project is a wrapper over the famous phpcassa library.

This extension also handles issues with the phpcassa library 'Data Types' while using the latest CQL3 API provided by cassandra. The following discussion on StackOverflow describes the problem:

http://stackoverflow.com/questions/16139362/cassandra-is-not-retrieving-the-correct-integer-value

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist beliy/yii2-cassandra-cql "*"

or

composer require beliy/yii2-cassandra-cql:dev-master

or add

"beliy/yii2-cassandra-cql": "*"

to the require section of your composer.json file.

Usage

'components' => [
...
  'cassandra' => [
        'class' => '\beliy\cassandra\Connection',
        'keyspace' => 'youkeyspace',
        'servers' => ['127.0.0.1', ...],
    ],
    'cache' => [
      'class' => '\beliy\cassandra\Cache',
      'tableName' => 'cache', // dedault 'cache'
      'tablePrefix' => 'mega', // default ''
    ],
    ...
  ]

  $cass = Yii::$app->cassandra;
  $cql = 'SELECT value FROM yourtable WHERE id=1';
  $query_result = $cass->cql3Query($cql);
  $rows = $cass->cqlGetRows($query_result);

  Usage for cache:
  First you may init column fammily storage fro cache.
  $cache = Yii::$app->cache;
  $cache->createTable();

  Than use standart Yii2 Cache APIs.

REQUIREMENTS

Yii 2.0.3 / PHP 5.5+

Resources

Fork extensions from http://www.yiiframework.com/extension/cassandra-cql

External Projects used in this extension is the phpcassa library for PHP and Cassandra https://github.com/thobbs/phpcassa

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固