[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[Nitro] [OG] - 0.16.0 with automated table evolution

Ilias Lazaridis

5/6/2005 5:41:00 PM

I've finished a non-intrusive extension to og (addition of one file,
"og-evolve.rb", no original source code touched), which enables
automated schema evolution (currently sqlite3 adapter).

require 'og'
require 'og-evolve'

-

you can disable the extension by simply removing the "require
'og-evolve'" statement (using "method rename), having the old behaviour
back.

-

functionality:

If you add a property to your object, a column is added to the
underlying table.

If anyone is intrested, I can sent the file via email.

[as a protest to the non-existent public code-repository and to
non-supporting my efforts on the project-forum (no responses), I've not
followed Mr. Moschovitis request to sent him the file]

-

[depending on the further delays of the next og version, I will possibly
extend this extension.]

-

The preliminary ob-evaluation (started 2 months before)

http://laz.../case/persi...

.

--
http://laz...
7 Answers

Aredridel

5/6/2005 6:14:00 PM

0

On 5/6/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> I've finished a non-intrusive extension to og (addition of one file,
> "og-evolve.rb", no original source code touched), which enables
> automated schema evolution (currently sqlite3 adapter).
>
> require 'og'
> require 'og-evolve'

Interesting. I'll try if if I get a chance.

> you can disable the extension by simply removing the "require
> 'og-evolve'" statement (using "method rename), having the old behaviour
> back.

"method rename?

Ari



Ilias Lazaridis

5/6/2005 6:31:00 PM

0

Aredridel wrote:
> On 5/6/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
>
>>I've finished a non-intrusive extension to og (addition of one file,
>>"og-evolve.rb", no original source code touched), which enables
>>automated schema evolution (currently sqlite3 adapter).
>>
>>require 'og'
>>require 'og-evolve'
>
> Interesting. I'll try if if I get a chance.

ok.

>>you can disable the extension by simply removing the "require
>>'og-evolve'" statement (using "method rename), having the old behaviour
>>back.
>
> "method rename?

sorry.

"method rename"

full text: I'm using ruby's "method rename" ( or more concise:
alias_method ) to keep the extension non-intrusive to the existen sources.

[I like that ruby!]

.

--
http://laz...

Aredridel

5/6/2005 6:45:00 PM

0

On 5/6/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> I've finished a non-intrusive extension to og (addition of one file,
> "og-evolve.rb", no original source code touched), which enables
> automated schema evolution (currently sqlite3 adapter).
>
> require 'og'
> require 'og-evolve'
>

Is there a place I can download the extension to try? It's a very good
idea, something I was thinking about myself over the past few coding
sessions.

Ari



Aredridel

5/6/2005 6:48:00 PM

0

On 5/6/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> Aredridel wrote:
> > On 5/6/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
> >
> >>I've finished a non-intrusive extension to og (addition of one file,
> >>"og-evolve.rb", no original source code touched), which enables
> >>automated schema evolution (currently sqlite3 adapter).
> >>
> >>require 'og'
> >>require 'og-evolve'
> >
> > Interesting. I'll try if if I get a chance.
>
> ok.
>
> >>you can disable the extension by simply removing the "require
> >>'og-evolve'" statement (using "method rename), having the old behaviour
> >>back.
> >
> > "method rename?
>
> sorry.
>
> "method rename"
>
> full text: I'm using ruby's "method rename" ( or more concise:
> alias_method ) to keep the extension non-intrusive to the existen sources.
>
> [I like that ruby!]
>

Aha. I'm interested to see how it integrates.

method_alias is a good thing. I sometimes wish it were more powerful,
but it's a good tool.



Ilias Lazaridis

5/6/2005 9:33:00 PM

0

Aredridel wrote:
> On 5/6/05, Ilias Lazaridis <ilias@lazaridis.com> wrote:
>
>>I've finished a non-intrusive extension to og (addition of one file,
>>"og-evolve.rb", no original source code touched), which enables
>>automated schema evolution (currently sqlite3 adapter).
>>
>>require 'og'
>>require 'og-evolve'
>
> Is there a place I can download the extension to try?
[...]

anyone intrested can get the file, simply by droping me a private email.

.

--
http://laz...

Ilias Lazaridis

5/7/2005 3:37:00 PM

0

Ilias Lazaridis wrote:
> I've finished a non-intrusive extension to og (addition of one file,
> "og-evolve.rb", no original source code touched), which enables
> automated schema evolution (currently sqlite3 adapter).
[...]

> functionality:
>
> If you add a property to your object, a column is added to the
> underlying table.

The OID column is generated as the _first_ field (instead of the last as
in the original implementation).

> If anyone is intrested, I can sent the file via email.
[...]

find the extension within the evaluation template:

http://laz.../case/persi...

direct link:

http://laz.../case/persist/og...

-

The code demonstrates a major strength of ruby:

Changing a Product behaviour by using the "alias_method".

.

--
http://laz...

Ilias Lazaridis

5/8/2005 2:55:00 PM

0

Ilias Lazaridis wrote:
> I've finished a non-intrusive extension to og (addition of one file,
> "og-evolve.rb", no original source code touched), which enables
> automated schema evolution (currently sqlite3 adapter).
>
> require 'og'
> require 'og-evolve'
>
> -
>
> you can disable the extension by simply removing the "require
> 'og-evolve'" statement (using "method rename), having the old behaviour
> back.

believe it or not:

[Nitro] Schema evolution
http://thread.gmane.org/gmane.comp.lang.ruby.nitro.g...

Mr. Moschovitis:
* keeps the censorship active
* the code-repository inactive
* and thus: ready code and a potential co-developer unused.

It's possibly time for me to get a serious product, like Active Record /
Rails.


>
> -
>
> functionality:
>
> If you add a property to your object, a column is added to the
> underlying table.
>
> If anyone is intrested, I can sent the file via email.
>
> [as a protest to the non-existent public code-repository and to
> non-supporting my efforts on the project-forum (no responses), I've not
> followed Mr. Moschovitis request to sent him the file]
>
> -
>
> [depending on the further delays of the next og version, I will possibly
> extend this extension.]
>
> -
>
> The preliminary ob-evaluation (started 2 months before)
>
> http://laz.../case/persi...
>
> .
>


--
http://laz...