定制 crassaert/php-azure-documentdb 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

crassaert/php-azure-documentdb

最新稳定版本:v1.1

Composer 安装命令:

composer require crassaert/php-azure-documentdb

包简介

PHP wrapper to query Microsoft Azure DocumentDB REST API

README 文档

README

PHP wrapper for CosmosDB (ex DocumentDB) operations (beta version)

Update January 2018 v1.1

  • Use of the x-ms-version 2017-02-22
  • PHP 7.0 mini recommended
  • Enhanced unit tests
  • Adding some errors throws

Usage

Install

composer require crassaert/php-azure-documentdb

Instantiate

$db = new AzureDocumentDB(AZURE_HOST, AZURE_KEY, false);

Databases operation

List

$db->get('database')->_list();

Creation

$db->get('database')->create('my_database');

Selection

$db->get('database')->select('my_database');

Remove

$db->get('database')->delete('my_database');

Collections

Before requesting, you have to select a database (see previous paragraph).

List

$db->get('collection')->_list();

Creation

$db->get('collection')->create('my_collection');

Selection

$db->get('collection')->select('my_collection');

Remove

$db->get('collection')->delete('my_collection');

Document

Before requesting, you have to select a database and a collection (see previous paragraph).

Creation

$db->get('document')->create($json);

Requesting

Fell free to write your SQL query here.

$db->get('document')->query('SELECT * FROM my_table');

Remove

You have to select your document before removing it to obtain the internal ID.

$rid = $document->_rid;
$db->get('document')->delete($rid);

TODO

Implement permissions, triggers, users, sprocs and UDF.

You can find all features on Microsoft Azure Website

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-11-19