On Wed, Mar 3, 2010 at 10:27 AM, Brian Aker <[email protected]> wrote: > Hi! > > On Mar 3, 2010, at 6:06 AM, Jay Pipes wrote: > >> drizzle> use no_schema; >> drizzle> select * from widgets; > > > Just rewrite the query to no_schema.widgets, there is no reason to need to > change SCHEMA.
We don't rewrite schema. The idea Jay was suggesting was to use the schema name to determine whether to rewrite a query or not. In the example plugin I developed, I had a specific string prefixing every query I wanted to rewrite. If the prefix was not present, I did not rewrite it. For example, in my plugin, if you do this: drizzle> create table widgets; and don't rewrite it, you will get a SQL syntax error. What I did in my plugin was the following: drizzle> nos create table widgets; So if I saw the 'nos' prefix, I knew to rewrite the query. What Jay is suggesting is: drizzle> use no_schema; drizzle> create table widgets; And I can tell from the schema that I should rewrite the query. Only if the query happens in no_schema will I rewrite the query. > > Cheers, > -Brian > _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

