{ "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": "
eval::stored_relation_conflict\n\n  × Stored relation triangles conflicts with an existing one\n    ╭─[9:1]\n  9 │         \n 10 │ :relation create triangles\n    ·                  ─────────\n    ╰────\n
" }, "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": [] } ] }