与SQL中的WHERE和ORDER BY子句有关的多列的Couchbase视图 [英] Couchbase view on multiple columns with WHERE and ORDER BY clause as in SQL

查看:95
本文介绍了与SQL中的WHERE和ORDER BY子句有关的多列的Couchbase视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Couchbase noSql数据库的新手.

I am new to Couchbase noSql database.

我正在尝试创建一个视图,我希望该视图应该给出如下SQL查询的结果.

I am trying to create a view, i want this view should give result as below SQL query.

SELECT * FROM Employee e WHERE e.name = "DESM%" AND e.salary < 1000 ORDER BY e.id desc

任何建议都非常感谢.

Any suggestion is very appreciated.

推荐答案

如果您在Couchbase中查看现有的啤酒样品(随啤酒一起提供),您将在其中找到定义的视图.在管理控制台中,您可以运行视图.请注意,在运行视图时,您可以为结果提供过滤条件和排序顺序...这可能与类似SQL的功能等效.进一步了解视图和索引

If you look at existing beer samples in Couchbase (it comes with it), you will find views defined there. In admin console you can run a view. Notice when you run a view you can provide filtering criteria and sort order for the result...that might be an equivalent for your SQL like functionality. Read more on Views and Indexes

另一种选择是使用Couchbase v3,它带有自己的 N1QL查询语言可以用作另一种选择.您可以在线此处进行试用.

yet another option is to use Couchbase v3 that comes with its own N1QL query language that can serve as another alternative. You can try it out online here.

这篇关于与SQL中的WHERE和ORDER BY子句有关的多列的Couchbase视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆