Jeff Thies wrote: > > After trying for a week to get the DBD::mysql driver loaded in FreeBSD > (couldn't find DBI during install) virtual server I thought I'd try > DBD::AnyData. > > Much to my surprise, I could do this: > my $sql='create table table1(field1 varchar(12),field2 varchar(12))'; > > Are any other data types supported by any of the formats?
Data types are currently "supported" in the sense that you can use them in a CREATE statement as you did. SQL::Statement (which underlies AnyData) will check that the types are valid SQL92 types and give an error message for the CREATE if not. It then promptly forgets what you told it about types. Eventually it won't do that (expect data type support in the next month or two). SQL::Statement won't let you do things like try to do math operations on strings, but it does that by looking at the actual values in the columns, not by refering to how the data was typed in the CREATE statement. > Any reason to prefer Pipe over CSV over Tab? Or is it just the way I > prepare the data to be inserted? These have to do with the storage of the data and nothing else. Once you declare how you have the data stored (or how you want it stored if you are creating the table for the first time), it really makes no difference, they all operate the same. If you have data stored in one format and you want it stored in another, see the import/export/convert methods. > Any way to hack an id field or auto increment? That is also on my to-do list. In the meantime, you can create your own (e.g. by doing a MAX(id) and incrementing that and using the result as the id for the next insert) or use one of the CPAN modules that creates counters and/or unique ids. > Any cool reasons to use the XML format if I'm not going to be exporting > XML. Nope. If you don't have or want the data in XML, there's no reason to prefer it over other formats. -- Jeff
