Re: [Drizzle-discuss] how to add field column in storage engine?

2010-07-11 Thread ZQ
Thanks for your tip, Stewart.
I am able to implement this functionality.
Though it seems kind of hack, but it works, it can read '/proc/meminfo'
directly.

On Wed, Jul 7, 2010 at 1:49 PM, Stewart Smith stew...@flamingspork.comwrote:

 On Tue, 6 Jul 2010 14:08:08 +0800, ZQ zim...@gmail.com wrote:
  This requirement does seem a little odd.
  This scenario comes from my file system storage engine when I try to read
  files as /proc/meminfo,
  I would like it to be transposed, so that MemTotal, MemFree and other
 would
  become columns, then user can
  just use the statement as 'select MemTotal from t1'.
  Otherwise, there will be only two columns for this file.
 
  What do you think, Stewart?

 I think it's a useful feature.

 you should be able to do this during gettabledefinition, just discover what
 fields there are and populate the proto with them.

 --
 Stewart Smith

___
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Drizzle-discuss] how to add field column in storage engine?

2010-07-06 Thread ZQ
On Mon, Jul 5, 2010 at 10:15 AM, Stewart Smith stew...@flamingspork.comwrote:

 On Wed, 30 Jun 2010 15:36:44 +0800, Zimin zim...@gmail.com wrote:
  I'm considering whether it's possible to add a field column in storage
  engine?
  If yes, which function should I invoke? Or hack into protobuf?

 as in one that the user didn't specify in CREATE TABLE?

 You'd add it to the proto, but I'd also have to ask why?

 --
 Stewart Smith


Hi Stewart,

This requirement does seem a little odd.
This scenario comes from my file system storage engine when I try to read
files as /proc/meminfo,
I would like it to be transposed, so that MemTotal, MemFree and other would
become columns, then user can
just use the statement as 'select MemTotal from t1'.
Otherwise, there will be only two columns for this file.

What do you think, Stewart?

--Zimin
___
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Drizzle-discuss] how to add field column in storage engine?

2010-07-06 Thread Stewart Smith
On Tue, 6 Jul 2010 14:08:08 +0800, ZQ zim...@gmail.com wrote:
 This requirement does seem a little odd.
 This scenario comes from my file system storage engine when I try to read
 files as /proc/meminfo,
 I would like it to be transposed, so that MemTotal, MemFree and other would
 become columns, then user can
 just use the statement as 'select MemTotal from t1'.
 Otherwise, there will be only two columns for this file.
 
 What do you think, Stewart?

I think it's a useful feature.

you should be able to do this during gettabledefinition, just discover what
fields there are and populate the proto with them.

-- 
Stewart Smith

___
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Drizzle-discuss] how to add field column in storage engine?

2010-07-04 Thread Stewart Smith
On Wed, 30 Jun 2010 15:36:44 +0800, Zimin zim...@gmail.com wrote:
 I'm considering whether it's possible to add a field column in storage 
 engine?
 If yes, which function should I invoke? Or hack into protobuf?

as in one that the user didn't specify in CREATE TABLE?

You'd add it to the proto, but I'd also have to ask why?

-- 
Stewart Smith

___
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp


[Drizzle-discuss] how to add field column in storage engine?

2010-06-30 Thread Zimin

Hi list,

I'm considering whether it's possible to add a field column in storage 
engine?

If yes, which function should I invoke? Or hack into protobuf?

Thanks.

--zimin

___
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp