The MasterTable
- networkdisk.sql.master.mastertable(dialect)
Function creating the MasterTable
The master table is an SQL Table, which is used to store graph master information. Typically, it will store a dump of the graph schema (:py:class:networkdisk.sql.graph.SchemaGraphSchema) together with the graph name (if provided), and possibly additional data.
Notes
The master table is an SQL Table, which is used to store graph master information. Typically, it will store a dump of the graph schema (networkdisk.sql.graph.SchemaGraphSchema) together with the graph name (if provided), and possibly additional data. The table has the following columns:
- ID INTEGER PRIMARY KEY:
the graph id, wich is an automatically incremented integer;
- NAME TEXT UNIQUE
the graph name, which is optional;
- TYPE TEXT NOT NULL
the graph type, which should be one of “SQLGraph”, “SQLDiGraph”;
- SCHEMA TEXT NOT NULL
the graph schema dump;
- CREATION_DATE INTEGER NOT NULL
the graph creation date;
- LAST_ACCESS_DATE INTEGER NOT NULL
the graph last modification date;
- LAST_ALTERATION_DATE INTEGER NOT NULL
the graph last access date;
- INFO TEXT
some additional graph information (optional).
Each row correspond to a distinct graph, which can be either identified by its name, if given, or by its id.
We can perform various graph manipulations using this class:
- class networkdisk.sql.master.MasterGraphs(dialect, db, autoinitialize=True, **kwargs)
A class to manipulate the MasterTable
- Parameters:
- db: str or Helper or db connector
Information to initialize the Helper
- kwargs:
Any keyword arguments that can be fed to the Helper class to initialize it.
- The MasterTable stores Graph Schema, some type information and some metadata information.
- Any entry can have any name without restriction, but id is unique.
|
Delete the Graph Schema in the Master Table |
|
Lists all Graph and/or DiGraph stored in the DB |
|
Load the Graph |
|
Save the Graph Schema in the Master Table |