Class: Omen::Schema
- Inherits:
-
Object
- Object
- Omen::Schema
- Defined in:
- app/models/omen/schema.rb
Overview
What Claude writes its SQL against: the app's own schema, less what the role may not read.
Constant Summary collapse
- HINT =
A plain index is a note about speed; a unique one is a fact about the rows, so it stays.
/^\s*t\.index (?!.*unique: true).*\n/
Instance Method Summary collapse
-
#initialize(role) ⇒ Schema
constructor
A new instance of Schema.
-
#text ⇒ String
The schema, without a table or a column the role is refused, and without an enum or a foreign key left behind by one.
Constructor Details
#initialize(role) ⇒ Schema
Returns a new instance of Schema.
7 8 9 |
# File 'app/models/omen/schema.rb', line 7 def initialize(role) @role = role end |
Instance Method Details
#text ⇒ String
Returns the schema, without a table or a column the role is refused, and without an enum or a foreign key left behind by one.
13 |
# File 'app/models/omen/schema.rb', line 13 def text = without_orphan_enums without_columns without_tables source |