in reply to Re^2: Non-retarded ORMs, and a general ORM discussions.
in thread Non-retarded ORMs, and a general ORM discussions.
You need an example? It's just a method. There you go. This creates one schema object based on whatever is in your database.
To read a PostgreSQL database and create a schema that can be used by Alzabo. If you feel like it, it looks like there's a ->runtime_clone method on the Alzabo::Create::Schema object as well. You wouldn't use that for normal runtime but it might be convenient for your maintenance scripts.
my $schema = Alzabo::Create::Schema->reverse_engineer( name => ..., rdbms => "PostgreSQL", user => ..., password= > ... ); $schema->save_to_file; # I forget how the save directory is configured
Your runtime code:
my $schema = Alzabo::Runtime::Schema->load_from_file( name => ... );⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Non-retarded ORMs, and a general ORM discussions.
by EvanCarroll (Chaplain) on Jun 16, 2006 at 21:46 UTC | |
by diotalevi (Canon) on Jun 16, 2006 at 21:50 UTC | |
by mman (Novice) on Oct 31, 2006 at 17:52 UTC |