使用 Julia 进行数据库抽象 [英] Database abstraction with Julia
问题描述
许多语言提供数据库抽象以将数据(对象)保存到关系数据库(通常通过对象关系映射 (ORM)).
Many languages provide database abstraction to save data (objects) to relational databases (generally through object relational mapping (ORM)).
我知道 Julia 不是传统"的面向对象语言(请参阅 julia: OOP 或不是)
I'm aware that Julia is not a "conventional" object oriented language (see julia: OOP or not )
但我想知道是否存在具有以下功能的库?
But I wonder if a library with the following features exists ?
通过数据库 URI 连接到数据库,例如
"dialect+driver://username:password@host:port/database"
(请参阅 Python SQLAlchemy http://docs.sqlalchemy.org/en/latest/core/engines.html )
Connect to a database through a database URI like
"dialect+driver://username:password@host:port/database"
(see Python SQLAlchemy http://docs.sqlalchemy.org/en/latest/core/engines.html )
将对象(实际上是复合类型的实例)存储到数据库中
Store objects (in fact instances of composite type) to a DB
从数据库中检索对象
推荐答案
JuliaDB 集合列出了各种连接数据库的方式(即 julia 库),其中大部分应该支持上述功能.
The JuliaDB collection lists various ways (i.e. julia libraries) to connect to databases, most of which should support the above functionality.
请参阅 https://github.com/JuliaComputing/JuliaDB.jl
这篇关于使用 Julia 进行数据库抽象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!