List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:May 22 2008 2:07pm
Subject:Re: SSQLS Limitation (again)
View as plain text  
On May 22, 2008, at 6:16 AM, Brett M wrote:

> one of the tables I need to read (not
> write to) has 31 columns, I only need the first seven and the very  
> last
> column.

Then you don't need 31 column support.

If the columns are named col1, col2, ..., col31, the SSQLS is  
something like:

sql_create_8(mytable_subset, 1, 8,
	sometype, col1,
	sometype, col2,
	sometype, col7,
	sometype, col31);

and your query is something like:

Query q = conn.query("select col1, col2, ..., col7, col31 from mytable  
where blabla");

You only need as many columns declared in the SSQLS as you actually  
pull from the DB.  (Technically not even that: if you pull more cols  
from the DB than is in the SSQLS, the extra just gets sliced off, in  

> this is an open
> source application and I hope many people will want to use it, I can't
> expect them all to do the same thing on their systems.

Anyone not interested in changing their MySQL++ code is likely to want  
binaries from you, not source.  So, if you ever do need more than 25  
of those columns at once, it's probably still not Game Over.

> does increasing the max_parameters to 31 and
> running the perl script really require a rebuild of the library?

No.  The definition of lib/ssqls.h only affects examples/ssqls*.cpp.

> Can I
> cheat and just generate the macros required for a 31 column table and
> copy them into a header in my own application code?

Sure, but technically that then requires that you use LGPL for your  
own code, or something compatible.

It also means you're one step behind whenever we change the definition  
of the SSQLSes.

Third strike: it isn't necessary, as described above.
SSQLS Limitation (again)Brett M22 May
  • Re: SSQLS Limitation (again)Warren Young22 May
    • Re: SSQLS Limitation (again)Brett M24 May