You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.3 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"metadata": {
"language_info": {
"codemirror_mode": {
"name": "text/plain"
},
"file_extension": ".txt",
"mimetype": "text/plain",
"name": "cozo",
"nbconvert_exporter": "text",
"pygments_lexer": "text",
"version": "es2017"
},
"kernelspec": {
"name": "cozo",
"display_name": "CozoScript (localhost)",
"language": "text"
}
},
"nbformat_minor": 4,
"nbformat": 4,
"cells": [
{
"cell_type": "markdown",
"source": "# The pilgrim to Mount Acid",
"metadata": {}
},
{
"cell_type": "markdown",
"source": "## Stored",
"metadata": {}
},
{
"cell_type": "markdown",
"source": "An obvious shortcoming of our previous acrobatics is that we have to carry around our love triangles network and enter it anew for every query, which leads to rapid deterioration of the `CTRL`, `C` and `V` on the keyboard. So let's fix that first.",
"metadata": {}
},
{
"cell_type": "code",
"source": "?[] <- [['alice', 'eve'],\n ['bob', 'alice'],\n ['eve', 'alice'],\n ['eve', 'bob'],\n ['eve', 'charlie'],\n ['charlie', 'eve'],\n ['david', 'george'],\n ['george', 'george']]\n \n:relation create triangles",
"metadata": {
"trusted": true
},
"execution_count": 10,
"outputs": [
{
"execution_count": 10,
"output_type": "execute_result",
"data": {
"text/html": "<pre style=\"font-size: small\"><span style='color:#a00'>eval::stored_relation_conflict</span>\n\n <span style='color:#a00'>×</span> Stored relation triangles conflicts with an existing one\n ╭─[9:1]\n <span style='opacity:0.67'> 9</span> │ \n <span style='opacity:0.67'>10</span> │ :relation create triangles\n · <span style='color:#a0a'><b> ─────────</b></span>\n ╰────\n</pre>"
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": ":db remove relation triangles",
"metadata": {
"trusted": true
},
"execution_count": 13,
"outputs": []
},
{
"cell_type": "code",
"source": "",
"metadata": {},
"execution_count": null,
"outputs": []
}
]
}