@dryv/sqlite-orm-modelsv0.1.0
sqlite_orm storage models with keys, indexes and foreign-key lifecycle actions.
dryv pack add @dryv/sqlite-orm-modelsversion: dryv.pack/v1alpha1
key: unit.persistence.sqlite-orm-models
layout: unit
package:
name: dryv_cpp_persistence
source: templates
info:
title: sqlite_orm Models
version: 0.1.0
description: Generates C++20 sqlite_orm 1.9 models and an aggregate storage factory from persistent Dryv schemas.
purpose: persistence
summary: sqlite_orm storage models with keys, indexes and foreign-key lifecycle actions.
languages: [cpp]
frameworks: [sqlite-orm, sqlite]
tags: [entities, database, orm, cpp]
plugins:
- name: jinja
extensions: [.j2]
inputs:
namespace:
type: string
default: dryv::generated::persistence
description: C++ namespace for generated persistence code.
selections:
entities:
subject: schema
filter:
all: { role: entity }
scope: each
all-entities:
subject: schema
filter:
all: { role: entity }
scope: all
templates:
entity:
$ref: "#/selections/entities"
output:
name: $(group.name.snake)_$(subject.name.snake)
symbol: $(group.name.pascal)$(subject.name.pascal)Entity
imports:
- $ref: "#/templates/entity"
storage:
$ref: "#/selections/all-entities"
output:
name: storage
symbol: makeDryvStorage
imports:
- $ref: "#/templates/entity"
provides:
schema.persistence:
$ref: "#/templates/entity"