简体   繁体   English

如何解决“错误:此QuadStore未注册”?

[英]How to fix “Error: This QuadStore is not registered”?

I am trying to load a sample chinook.db database into Cayley. 我正在尝试将示例chinook.db数据库加载到Cayley。 I am using a standart Cayley config file cayley_example.yml with small changes specific to sqlite3 . 我使用的是标准的Cayley配置文件cayley_example.yml其中有一些特定于sqlite3更改。

Here's chinook.db 这是chinook.db

cayley_example.yml

store:
  # backend to use
  backend: sqlite
  # address or path for the database
  address: "./chinook.db"
  # open database in read-only mode
  read_only: false
  # backend-specific options
  options:
    nosync: false
query:
  timeout: 30s
load:
  ignore_duplicates: false
  ignore_missing: false
  batch: 10000

If I execute ./cayley init -c cayley_example.yml , I get Error: This QuadStore is not registered. 如果我执行./cayley init -c cayley_example.yml./cayley init -c cayley_example.yml收到Error: This QuadStore is not registered. I tried to follow this guide but .cfg files are not supported by the current Cayley version. 我尝试遵循此指南,但是当前Cayley版本不支持.cfg文件。

While running the command cayley init , add flag -d and "storage type". 运行命令cayley init ,添加标志-d和“存储类型”。 For your case- cayley init -d "sql" 对于您的情况cayley init -d "sql"

Check if Cayley version that you use supports SQLite: 检查您使用的Cayley版本是否支持SQLite:

cayley -h

You would see a list of supported backends in the help message for -d option: 您将在-d选项的帮助消息中看到受支持的后端列表:

  -d, --db string  database backend to use:
                   badger, bolt, btree, ..., mysql, postgres, sql (default "memstore")

If you built the binary from source, make sure you built the latest one and CGO_ENABLED=1 is set. 如果您从源代码构建二进制文件,请确保已构建最新的二进制文件,并且已设置CGO_ENABLED=1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM