Replies: 1 comment 2 replies
-
If you look at the code history, you'll see not much has changed in the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create a table without using the DSL directly. It looks like the way to do this is
Schema::CreateTableGenerator
and define the schema by calling its instance methods.Database::create_table
with the generator as its:generator
option.Looking at the source code, this looks like it will work (although I haven't tried it yet). However, the documentation seems to indicate that
CreateTableGenerator
is internal and not something I should be messing with. So my questions are:For context, what I'm trying to do is create a class that behaves kind of like the Ruby
Struct
class but holds its data in a database. I'd like users to be able to define the fields in the argument list and any methods in an optional block and avoid needing another block to evaluate the Sequel DSL.(As an aside, I think Sequel is very cool in general and I really appreciate its existence. I realize that what I'm doing is a bit outside of the problem domain.)
Beta Was this translation helpful? Give feedback.
All reactions