Comments (8)
example没有更新到2.2.0版本,可以看一下https://github.com/hyperf/gotask/blob/master/tests/Cases/MongoDBTest.php 这里的用法。
from gotask.
用的2.2版,问题依旧
from gotask.
用的2.2版,问题依旧
是example里给的使用方式不是最新的。现在已经更新了。
from gotask.
$client = make(MongoClient::class);
$collection = $client->database('test')->collection('test');
$result = $collection->find(['user_id' => 0], ['skip' => 0, 'limit' => 1]);
print_r($result);
from gotask.
用的是MongoClient这个类
from gotask.
貌似是因为mongo加了用户密码认证就不行了:mongodb://ssaa:[email protected]:27017
from gotask.
了用户
用户名密码要在config里配置呀
from gotask.
这里有一个hyperf下使用的demo: https://github.com/reasno/fastmongo
from gotask.
Related Issues (20)
- Limit 不生效
- sock 文件没生成 HOT 1
- 找不到sock是什么原因呀?如果没有启动该怎么启动呢 HOT 1
- unable to establish connection tcp://127.0.0.1:6001: Connection refused (111) HOT 3
- 找不到依赖包
- ConfigProvider.php bug HOT 1
- 这里代码有误
- 2.2.7 版本下 socket 连接拒绝是为什么? HOT 1
- undefined: syscall.Stat_t HOT 1
- mongo_client批量插入的时候部分_id重复无法获取实际插入的数量
- MongoDB transactions
- mongodb偶尔会出现Connection refused HOT 2
- composer 安装 包冲突 建议升级一下依赖包的版本 HOT 3
- 请求MongoClient频繁出现 WARNING Server::check_worker_exit_status(): worker(pid=47106, id=156) abnormal exit, status=0, signal=11
- Doens't have support to hyperf/process v3
- No entry or class found for 'MongoProxy.InsertOne'
- Questions about Asynchronous Communication Feature in GoTask
- hyperf3.1不支持 HOT 1
- Type mixed cannot be marked as nullable since mixed already includes null
- gotask是不支持协程风格吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotask.