AW: [DIRECT-L] Valentina 2.0. -- What is your 3 DREAM features? // XML

Florian Bogeschdorfer fb at memedia.de
Mon Feb 2 16:03:05 CST 2004


How did this come to Direct-L ????

> >
> > Mix, subtract, add, merge existing cursors
> 
> We have made this on SQL level in the first turn.

OK. Say I make 2 cursors with similar requests:

Cursor1=makeCursor("SELECT * FROM table WHERE name='Florian')
Cursor2=makeCursor("SELECT * FROM table WHERE name='Ruslan')
Cursor3=VALmergeCursor(Cursor1,Cursor2)

The result is a new cursor having all records from Cursor 1 and 2. I know
this can be easily done with SQL but what if the SELECT criteria is much
larger? Also what about speed (we discussed that already, remember?) It
would moreover be so elegant. Also maybe you have a large cursor and you
could easily subtract step by step.
Or you have the result of a time-consuming query and hold it in RAM. Now
some parameters change by time/demand/whatever and instead of doing an all
new query on the whole database I just say: "please subtract all names
starting with 'r'".
Or two clients make a similar cursor depending on some client data. Now I
want to use both cursors from a third client and work with the data in a
repeat loop. Instead of having to check both cursors I merge them and have
no double records maybe.

So:

ADD would put two cursors together, if results are double, the cursor will
have it double
MERGE will join the two cursors, looking if some results and ids are the
same and have a double record only occur once
SUBTRACT will subtract :-)

Of course this needs a lot of thinking. Maybe only cursors with the same
tables and fields can be used (would make sense for me)

Example: in my database application my user looks for adresses and names for
a weekly mailing. He makes a cursor with all girls between 20 and 30 from
bavaria maybe. I kind of "store" this cursor in my application, saving the
record Ids (my own, not RecId) and the query. Now the other day, my client
says he wants to send out a mailing again but he has made another very
complex search where he determined records that should not receive mail
anymore. He has saved this result also. Now he could say: take mailing list
query (1) and subtract this list (query 2). Voila: all I do is make cursor
1, make cursor 2 and do VALsubtractCursors(cursor1,cursor2). Now need to
somehow make a most difficult SQL syntax that even might not work due to
some restrictions in SQL.

I would also like so save cursors to disk. Make a query, need the cursor
again in some days, so I save it to disk. Interesting, because if I would
repeat the query in a week, it might not be the same because of changed
data. Right now, I save a list with my own record Ids to disk, but I can not
make it a cursor anymore...I have to go through the list step by step if I
need additional data.

I love this cursor thing (after having adepted to it) but I would like to
work with them more comfortable:
ADD,MERGE,SUBTRACT,LOAD,SAVE,XMLDUMP

About the XML dump:

Right now we can export the whole DB to XML.

Now again my user makes his mailing selection

SELECT * FROM myCustomers WHERE girls are between 20 and 30 and come from
Bavaria

Now he wants to use this cursor data with another program (say his preferred
label print program)

At the moment I export this to .csv with my own routines.
I would love to export the result of a query (a cursor with record data) to
an external XML file so one could use it in other programs. I am no XML pro
so maybe this is not enough info but the format could be similar to the
dump() feature but only with the cursor data...

Best regards, Florian

> 
> > Erasing (overwriting) deleted records on demand
> 
> ok
> 
> > Export cursors to XML
> 
> Florian, explain this in details.
> Very in details.
> 
>     What query for example you do?
>     what XML format you want to get from us?
>     how and where you will use this XML dump?
> 
> Please answer on Valentina list.
> 
> > Using V4MD local AND server at once
> 
> ok
> 
> > Callback handlers for large DB operations (for progress bar)
> 
> ok



More information about the Valentina mailing list