I think it would be a good addition to the SQLite API. Make a ticket, post the patch and see if DRH accepts it.
As far as "circumventing" the API goes, for your use in RSQLite just make a copy of the function in question, rename it, have the function accept just a single argument (const char* decl) and get rid of all references to the Token struct. Use tolower() instead of the array sqlite uses for the same purpose. Have it return the standard (public) sqlite column types. Keep in mind that the column decl type is not strictly enforced in SQLite anyway - you can stuff any type in any column - this may be the reason why DRH did not make it part of the public API. It would suggest a sort of guarantee that does not exist. ----- Original Message ---- From: Seth Falcon <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Wednesday, November 22, 2006 11:08:54 AM Subject: Re: [sqlite] A way to get SQLite type from decl type? Joe Wilson <[EMAIL PROTECTED]> writes: > This is the internal code that sqlite uses to convert the > declaration type to the REAL, INT, TEXT, BLOB types. > > Happy hacking... Thanks for the pointer. I can create the appropriate struct and call sqlite3AffinityType and this gives me a solution. But, of course, I don't like the idea of circumventing the API. Any chance this would become part of the API (or a wrapper of it)? Would there be interest in a patch? Perhaps a function that maps column decl strings to SQLITE_INTEGER and friends. + seth ____________________________________________________________________________________ Sponsored Link $200,000 mortgage for $660/ mo 30/15 yr fixed, reduce debt http://yahoo.ratemarketplace.com ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------