Mon 11 Jan 2021
Wed 6 Jan 2021
REST plus RPC: the right data in the right format, and no more
Tue 5 Jan 2021
REST plus RPC: Do the demo backward
Free Midas software plus a contest
Wed 2 Jun 2010, 01:43 PMTweet
by Ben Langhinrichs
Copyright © 2010 Genii Software Ltd.
What has been said:
903.1. Jerry Carter (06/02/2010 08:21 PM)
Congratulations on your release, Ben. The 'free sample' is a time honored institution of capitalism. :-) May it reap the intended benefits for you and the community.
903.2. Richard Schwartz (06/02/2010 08:33 PM)
Does the key matching assume the the KeyColumn(+chunk) is a sorted list of values?
903.3. Ben Langhinrichs (06/02/2010 09:01 PM)
Jerry - Thanks!
Richard - By default it does not, since ad hoc data is so often... ad hoc, and since any one table can have at most 255 rows. There may be a property setting which can turn the aware of sorting back on. Let me know if you want that, as the engine certainly supports it.
903.4. Richard Schwartz (06/02/2010 09:36 PM)
Actually, I think it is preferable that it does not assume sorting, so don't add a property setting on my account!
Next question: since it does not assume sorting, am I correct in assuming that multiple matches will be found, even if separated by non-matching rows?
903.5. Ben Langhinrichs (06/02/2010 10:06 PM)
That is correct. It returns a value from each row that matches. For example, in the Currency fluctuation table from the sample db, you have two tables with dates in the format mm/dd/yyyy in the first column, and a conversion rate between US dollars and the Euro in the second column. If you want to get the average rate for the 13th of each month (06/13/2009, 07/13/2009 all the way to 05/13/2010), you would use the following formula (two @DbLookups because there are two tables):
rates := @DbLookup("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Inside Table 1; Table 1"; "/13/"; 2; "Format=Number KeyMatch=SUBSTR"):@DbLookup("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Inside Table 1; Table 2"; "/13/"; 2; "Format=Number KeyMatch=SUBSTR");
avg := @Sum(rates)/@Elements(rates);
903.6. Ulrich Krause (03.06.2010 05:02)
Hint: the sample database is encrypted ...
903.7. Ben Langhinrichs (06/03/2010 12:47 PM)
Sorry about the encryption. I had a small problem, fixed it and accidentally put up the encrypted version. Will fix in about half an hour.
903.8. Ben Langhinrichs (06/03/2010 02:27 PM)
Should be fixed now.
903.9. Ulrich Krause (04.06.2010 05:35)
How do I get a list of valid "chunkdefs"? Table or Bullet are in the sample. What about others?