|
Pages: [1]
|
 |
|
Author
|
Topic: BUG: db-select/where (Read 877 times)
|
François V.
Guest
|
Hello,
I am discovering/testing RebDB in order to replace MySQL protocol. I followed the Quick Start, but get the following bug with Rebol/View 1.2.41.3.1 I beleive this might be a bug.
>> db-select/where * my-table [like Note "-3"] ** Script Error: if expected then-block argument of type: block ** Where: db-select ** Near: if not empty? buffer [ if order [ if all [echo? trace?] [start-trace join "Sort " length? by-columns] either desc [ sort/skip/compare/reverse buffer length? columns by-columns] [ sort/skip/compare buffer length? columns by-columns] if all [echo? trace?] [stop-trace]] if html [ emit/html table columns buffer]]
By the way, RebDB looks great. You shoul design a logo "Powered by RebDB!"
François Vanzeveren
|
|
|
|
|
Logged
|
|
|
|
François V.
Guest
|
Same problem occurs with:
>> db-select/where * my-table [any [id < 3 date > 5-Jan-2004]] ** Script Error: if expected then-block argument of type: block ** Where: db-select ** Near: if not empty? buffer [ if order [ if all [echo? trace?] [start-trace join "Sort " length? by-columns] either desc [ sort/skip/compare/reverse buffer length? columns by-columns] [ sort/skip/compare buffer length? columns by-columns] if all [echo? trace?] [stop-trace]] if html [ emit/html table columns buffer]] >> db-select/where * my-table [all [id < 3 date > 5-Jan-2004]] ** Script Error: if expected then-block argument of type: block ** Where: db-select ** Near: if not empty? buffer [ if order [ if all [echo? trace?] [start-trace join "Sort " length? by-columns] either desc [ sort/skip/compare/reverse buffer length? columns by-columns] [ sort/skip/compare buffer length? columns by-columns] if all [echo? trace?] [stop-trace]] if html [ emit/html table columns buffer]] >>
|
|
|
|
|
Logged
|
|
|
|
|
Ashley
|
Something is amiss here. Lets get some more information to resolve this.
1. RebDB v1.0 or v1.1? 2. Result of db-describe my-table 3. Result of db-select * my-table (if table has <= 10 rows) 4. Copy of my-table.ctl
That should do it for the moment.
|
|
|
|
|
Logged
|
|
|
|
|
François
|
Hi,
Thanks for you quick reaction. I tried the Quick Start again, and now everything looks right. No problem any more. Hum, that's weird! The thing is that when the error occured yesterday, things were so messed that even a simple 'db-select * my-table' threw an exception.
Maybe i made sth wrong! It it occurs again, I will be back!
Nevertheless, here are the answers: 1) RebDB 1.1 2) >> db-describe my-table
Column K I Type Bytes ------------ - - -------- ---------- ID integer! 3 Date date! 2 Note string! 12
3 row(s) selected in 0:00:00.015 seconds
3) ID Date Note -------- ----------- ------------ 1 10-Jan-2004 Note-1 2 9-Jan-2004 Note-2 3 8-Jan-2004 Note-3 4 7-Jan-2004 Note-4 5 6-Jan-2004 Note-5 6 5-Jan-2004 Note-6 7 4-Jan-2004 Note-7 8 3-Jan-2004 Note-8 9 2-Jan-2004 Note-9 10 1-Jan-2004 Note-10
PS: I will use your lib for my project, it is so cool not to have to worry about installing MySQL on every client machine!!
Thanks
|
|
|
|
|
Logged
|
|
|
|
|
Ashley
|
I'm glad things sorted themselves out. Output looks OK now, I think your previous problems may have been caused by an invalid table specification. The next version of RebDB (v1.2) addresses that issue (also has a "powered by" logo  ) and should be released early march.
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |
News: 01-09-08 Alpha version of REBOL 3 has been released!
2311 Posts in 595 Topics by 4138 Members
Latest Member: Irrederwasy
|