[Gambas-user] Oh dear... Gambas Source (implement blob into gb.db)
Michael Isaac
m_isaac at ...689...
Fri Mar 11 21:32:48 CET 2005
Benoit implemented a Copy(x, y) method to the array class at my
request. I may not be understanding what you are asking but if you need
join a byte array you could try
dim x as byte[]
psudeo_array_filling_function_here(x)
x.copy(0, (ubound(x) -1))
Im not in gambas otherwise i would test it for you.
--
Michael
Rob wrote:
>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
>
>
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>_______________________________________________
>Gambas-user mailing list
>Gambas-user at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
More information about the User
mailing list