[Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial)

George Moschovitis george.moschovitis at gmail.com
Mon Sep 3 09:40:40 EDT 2007


Nice, I guess we can remove line 291 then?

-g.

On 9/3/07, Mark Van De Vyver <mvyver at gmail.com> wrote:
>
> > >  INFO: Og uses the Mysql store.
> > > DEBUG: Og manageable classes: [Member]
> > > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text,
> > > `address1` text, `city` text, `state` text, `email` text, `oid`
> > > integer AUTO_INCREMENT PRIMARY KEY)
> > > DEBUG: SELECT * FROM `ogmember` LIMIT 1
> > > DEBUG: SELECT * FROM `ogmember` LIMIT 1
> >
> > This I've tracked down to:
> > [./og/lib/sql.rb]
> > Line 290
> > Line 291
> >
> > In line sql.rb:290 SQLEnchantMixin#og_create_scheme is called, which
> > in turn calls SQLStore#create_field_map.
>
> The full route to the first call of SQLStore#create_field_map is:
> sql.rb:290          og_create_scheme
> sql.rb:79            evolve_schema
> evolution.rb:59   create_field_map
>
> The second call of SQLStore#create_field_map is:
> sql.rb:291           create_field_map
>
>
> >
> > Hence the duplicated queries to the database whenever a table is
> created.
> >
> > I'm not sure how to fix this, but hope this helps someone.
> > I'm happy to help test if needed.
> >
> > Mark
> >
> > > Using the Sqlite adapter I see something slightly different, but still
> > > the duplicate `'SELECT':
> > >
> > >  INFO: Og uses the Sqlite store.
> > > DEBUG: Og manageable classes: [Member]
> > > DEBUG: CREATE TABLE ogmember (first_name text, last_name text,
> > > address1 text, city text, state text, email text, oid integer PRIMARY
> > > KEY)
> > >  INFO: Created table ogmember.
> > > DEBUG: SELECT * FROM ogmember LIMIT 1
> > > DEBUG: SELECT * FROM ogmember LIMIT 1
> > >
> > >
> > > HTH
> > > Mark
> > >
> > >
> >
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://www.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070903/b389eb61/attachment.html 


More information about the Nitro-general mailing list