[Gambas-user] Oh dear... Gambas Source (implement blob into gb.db)
    Rob 
    sourceforge-raindog2 at ...94...
       
    Fri Mar 11 15:39:22 CET 2005
    
    
  
On Friday 11 March 2005 06:46, Thomas Kleindienst wrote:
> I had the idea to implement blobs into GB.db myself, but I'm lost
> in the code (dunno where to start)
>
> should be like:
>
> dim ba as byte[]
I think I asked this before, but I don't think anyone responded.  
What's the downside to just adding a join() method to the Byte[] 
class, since inserting blobs as strings seems to work fine?
Won't your modifications to gb.db just be implementing a join()-like 
functionality anyway, internally to the component?
Under what circumstances would you use byte[] in Gambas rather than 
string[] or integer[]?
It looks like the code that maps blobs to strings is 
driver-specific.... in src/lib/db/mysql/main.c and 
src/lib/db/sqlite/sqlitedataset.cpp.  In the case of mysql, I'd say 
you need to change it so a BLOB becomes a GB_T_OBJECT and do what you 
need to do to allocate the object and populate it.  Either that or 
you can look at DB_Format in src/lib/db/main.c and try to add code to 
accept GB_T_OBJECT arguments and then verify that they're Byte[] 
arguments, then do pretty much the same thing as the GB_T_STRING and 
GB_T_CSTRING cases do.
That's where I'd start, anyway, not having looked at the db component 
and drivers until 5 minutes ago.  I'm copying gambas-devel because 
we're getting into devel territory.
Rob
    
    
More information about the User
mailing list