Blob support, in general, would be good, but I don't think it is a good solution to this problem. I am thinking of converting all arrays to these strings. I don't think databases are especially efficient if everything is a blob. They handle strings much more efficiently. I think the best solution would be to implement a 13⎕CR and 14⎕CR that would translate back and forth using only printable ASCII characters without any control characters, '\0', high bit, etc.. Would this be hard?
Thanks a lot! Blake On Sat, Apr 19, 2014 at 9:43 AM, Elias Mårtenson <[email protected]> wrote: > You are right. The SQL implementation uses C strings behind the scenes for > both SQLite and Postgres. > > I'll be happy to implement BLOB support if you can suggest a good syntax > for it from APL. > > Regards, > Elias > > > On 19 April 2014 22:34, Blake McBride <[email protected]> wrote: > >> Looks good. I am a little concerned that the vector produced by 3 ⎕TF >> may have trouble going to and from an SQL VARCHAR using the existing (and >> fantastic!) library. I am not sure, but there may be a problem with C null >> characters ('\0') or other non-printable characters. Some feedback on this >> would be very helpful. >> >> Thanks! >> >> Blake >> >> >> >> On Sat, Apr 19, 2014 at 9:20 AM, Juergen Sauermann < >> [email protected]> wrote: >> >>> Hi Blake, >>> >>> I have added 11⎕CR for APL → CDR and 12⎕CR for CDR → APL conversions, >>> see SVN 217. >>> >>> For example: >>> >>> * 12 ⎕CR CDR←11 ⎕CR 'Hello' 1 (2 3)* >>> * Hello 1 2 3 * >>> * ⍴CDR* >>> *128* >>> >>> >>> /// Jürgen >>> >>> >>> >>> On 04/19/2014 12:16 PM, Blake McBride wrote: >>> >>> Greetings, >>> >>> Now that the wonderful SQL interface is working for me, I believe I >>> can create a component and keyed file system in straight APL easily. I >>> just need to understand ⎕TF a bit better. >>> >>> 1. 3 ⎕TF seems to produce a string vector representation of an >>> arbitrary nested array without retaining the specific name of the variable. >>> Is this true? (If so, this is exactly what I need!) >>> >>> 2. How can I reverse the process? i.e. if X holds the result of a 3 >>> ⎕TF, I need a way of converting it back to an APL (possibly nested) array >>> that is exactly the same array. i.e.: >>> >>> x←(5 5⍴⍳25) 'Hello there' >>> y←3⎕TF'x' >>> z←?????????? >>> >>> I need to know what ?????? is so that x and z have the exactly >>> equivalent arrays. >>> >>> 3. I am a little concerned that the vector produced by 3 ⎕TF may have >>> trouble going to and from an SQL VARCHAR using the existing (and >>> fantastic!) library. I am not sure, but there may be a problem with C null >>> characters ('\0') or other non-printable characters. Some feedback on this >>> would be very helpful. >>> >>> I suppose I can achieve the same effect by using 2⎕TF and then >>> dropping the assignment part before executing the string. This should be >>> highly portable but I'd guess less efficient. Thoughts? >>> >>> Thanks a lot!! >>> >>> Blake >>> >>> >>> >> >
