Skip to content

Chapter 4 Exercise 2 Answer #27

@apterf

Description

@apterf

Hi I am learning datalog with the website of this project. It is quite fun but I have a small question here.

In Chapter 4 Exercise 2, the instruction guide likes "To find all installed attributes you must use the :db.install/attribute attribute".

However, the answer without using ":db.install/attribute" will trigger the correct answer. Just got a little bit confusing about it.

Here is the answer which also trigger the results:

[:find ?attr ?type ?card
 :where

 [?a :db/cardinality ?c]
 [?c :db/ident ?card]

 [?a :db/valueType ?t]
 [?t :db/ident ?type]

 [?a :db/ident ?attr]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions