PostGIS 查询和 Cayenne

发布于 2024-12-02 01:01:05 字数 231 浏览 2 评论 0原文

我刚刚开始评估 Cayenne 与我的 PostGIS 数据库的使用。我发现 CayenneModeler 非常易于使用,可以为我的持久类生成代码。我认为使用 Expression.fromString("...") 可以让我使用 PostGIS 函数创建表达式,但我收到了 ExpressionParser 错误。经过进一步阅读,看起来我可能需要一个 PostGIS 数据库适配器。有谁知道是否存在可以免费下载的软件或解决此问题的方法?非常感谢。

I have just started evaluating the use of Cayenne for use with my PostGIS database. I found the CayenneModeler extremely easy to use in order to generate the code for my persistent classes. I thought that using the Expression.fromString("...") would allow me to make an Expression using the PostGIS functions, but I receive a ExpressionParser error. Upon further reading, it looks like I may need a PostGIS database adapter. Does anyone know of the existence of one that can be downloaded freely or a way to get around this? Thanks so much.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍白女子 2024-12-09 01:01:05

查看源代码,这些是当前支持/交付的数据库适配器:

$ ls -l org/apache/cayenne/dba/ | grep ^d
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 db2
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 derby
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 frontbase
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 h2
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 hsqldb
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 ingres
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 mysql
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 openbase
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 oracle
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 postgres
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 sqlite
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 sqlserver
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 sybase

Cayenne 提供抽象和适配器提供商特定的翻译。所以是的,你需要它是对的。您可能希望扩展 PostgreSQL 适配器,因为 PostGIS 构建在 Postgres 上。

如果您了解 BNF,这里是 Expression 语言的正式语法解析器识别。

looking at source, these are currently supported/shipped db adapters:

$ ls -l org/apache/cayenne/dba/ | grep ^d
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 db2
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 derby
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 frontbase
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 h2
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 hsqldb
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 ingres
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 mysql
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 openbase
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 oracle
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 postgres
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 sqlite
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 sqlserver
drwxr-xr-x 2 zeratul zeratul  4096 2010-11-11 16:15 sybase

Cayenne provides abstraction and adapters provider specific translation. So yes, you are right about needing it. You might want to extend PostgreSQL Adapter as PostGIS builds on Postgres.

If you know something about BNF, here is formal grammar of language that Expression parser recognizes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文