RunLogosRunLogos
中文EN

SQL Designer

The SQL Designer is a visual database schema editor. It reads your schema files and gives you a table-and-field editor, DDL export, and code generation — all without writing raw SQL by hand.

Available in RunLogos Pro.

Opening the designer

  1. Click logos/resources/database/ in the file tree.
  2. Select any schema file (e.g. schema.sql or schema.md).
  3. The center panel loads the SQL Designer.

Editing tables

The left panel lists all tables. Select a table to edit it:

  • Fields — add, remove, or reorder columns; set name, type, length, nullable, default value
  • Indexes — add primary key, unique, or regular indexes
  • Foreign keys — define relationships between tables with cascade rules

Changes are reflected in the DDL preview in real time.

DDL export

Click Export DDL to generate SQL for your target database:

  • MySQLCREATE TABLE with MySQL-specific types and engine options
  • PostgreSQL — with SERIAL, UUID, and PostgreSQL-native types
  • SQLite — simplified DDL compatible with SQLite constraints

The exported file is saved to logos/resources/database/ and can be used directly in migrations.

MyBatis boilerplate generation

For Java/Spring projects, the SQL Designer can generate a full MyBatis layer from your schema:

  1. Select one or more tables.
  2. Click Generate MyBatis.
  3. RunLogos produces:
    • Entity — Java POJO with field annotations
    • Mapper interface — with standard CRUD method signatures
    • Mapper XML — with <select>, <insert>, <update>, <delete> statements
    • Service interface + implementation — basic CRUD service layer
    • Controller — REST controller with standard endpoints

Generated files are placed in the path you specify (e.g. src/main/java/com/example/).

HTML documentation export

Click Export Docs to generate a self-contained HTML file documenting every table, field, type, and relationship. Share it with your team or attach it to a PR.

Typical workflow

  1. The Schema Skill (Phase 05) generates an initial schema.sql from your OpenAPI spec.
  2. Open the SQL Designer to review and adjust field types, add indexes, set defaults.
  3. Export DDL and commit it.
  4. Generate MyBatis boilerplate if your stack uses it.
  5. Hand the boilerplate to the Code Skill as additional context.

Next step

Agent Panel