Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: BUG: db-select/where
Pages: [1] Print
Author Topic: BUG: db-select/where  (Read 878 times)
François V.
Guest


Email
BUG: db-select/where
« on: February 24, 2004, 02:58:50 PM »

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


Email
BUG: db-select/where
« Reply #1 on: February 24, 2004, 03:09:22 PM »

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
Newbie
*
Offline Offline

Posts: 37


View Profile
BUG: db-select/where
« Reply #2 on: February 24, 2004, 10:49:15 PM »

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
Newbie
*
Offline Offline

Posts: 7


View Profile
BUG: db-select/where
« Reply #3 on: February 25, 2004, 02:28:49 PM »

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
Newbie
*
Offline Offline

Posts: 37


View Profile
BUG: db-select/where
« Reply #4 on: February 25, 2004, 06:38:30 PM »

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 Smiley) and should be released early march.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Sand Box  |  RebDB  |  Topic: BUG: db-select/where
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 07:25:00 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2311 Posts in 595 Topics by 4140 Members
Latest Member: Houolid

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc