Ferreteria/v0.6/clade/Sys/Data

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys
Jump to navigation Jump to search
Subpages

Subpages

Namespace prefix is always "Woozalia\Ferret\Sys\Data". Filespec prefix is always "<project prefix>/src/Sys/Data".

clades spaces
namespace endname description
Sys\Data Codec data coder-decoder clade-tree
Sys\Data Engine database engine administrator clade & database system
namespace endname description
Sys\Data aux data-handling auxiliary clades
Sys\Data Things collections (arrays, iterables...) (#TODO: lowercase the name)
Sys\Data tree tree-structures

About

2026-01-09: This documentation may need some updating.

The top layer of this is about Requests (an expression that asks the code to do something), how they are encoded, and how the decoded data is converted into operations.

Under that are the subsystems that operate on the decoded data:

  • Database: the Request is basically SQL
  • URLs and CLI commands: a command requested by the user, sometimes constructed by code for the user to choose
  • Variable expressions: these are used in templates to generate output whose format can be easily configured

Terminology

2026-01-09 This part definitely seems updated; we now use "Oper/Ops" and "Conn" to distinguish between DB data-operations and connection/administration. (#TODO: update)

  • a Data Entity is a table, query/view, trigger, etc.
  • a Schema is a collection of Data Entities that usually work together for an application
  • a Database Service (`DbService` or `Eng[ine]Inst[ance]`) is an instance of a Database Engine, and contains Schemas
    • This is server-side functionality. Ferreteria should not contain classes named after this concept.
    • What Ferreteria does have is code to connect to a server, which is part of the `DbConn` clade.
  • a Database Engine is a particular piece of software that can host databases
    • This is server-side functionality. Ferreteria should not contain classes named after this concept.
    • What Ferreteria does have is code to interact with specific Database Engines via a connection, i.e. the other part of the `DbConn` clade.
  • a Database Connection is a connection to a specific Database Server, which is running a specific Database Engine

Class Structure

  • 2026-01-09 This is pretty much all obsolete now; should be moved to archive page. #TODO
  • 2024-08-21 Currently trying out the idea that CommSpec should be the class-definer and creator of everything else.

OLD STRUCTURE WAS:

  • Codec class:
    • specifies a CommSpec class
    • can create a single CommSpec object
    • retains the CommSpec it is using
  • Request class:
  • CommSpec (./Request/Aux/Spec):
    • contains a Request (optional)
    • makes/retains a Codec
    • makes/retains a Codec-Marks object
    • makes/retains a Request Reader
    • makes/retains a Request Writer
    • makes additional Request Writers