Skip to content

storage: generate schema and queries automatically #27

Closed as not planned
@yliang412

Description

@yliang412

Description

The current user experience of integrating new operators with persistent storage is not great. To add a new operator, we need to define the schema of the operator table and edit each memo table API that relies on operator-specific implementation.

Luckily, the operator schema and the queries we need to run exhibit a simple structure that could be integrated into the codegen pipeline.

Requirement

We do not have everything generated in a single pass. The following tasks can be gradually introduced into the system.

  • Generate the insertion queries based on the rust operator struct definition
  • Generate the union all queries for getting all expressions in a group.
  • Write a CLI tool that integrates with sqlx-cli to generate the migrations
    • operator schema
    • indexes
    • maybe triggers, TBD

Originally posted by @skyzh in #26 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions