r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebDB] REBOL Pseudo-Relational Database

onetom
16-Apr-2011
[256x13]
and the spool file... which is suggested to be called session.log 
but then it will be replayed by the commit * in login.sql if it's 
in the data directory..
if exists? login: join system/script/parent/path %login.sql [ client/run 
login ]

this would make more sense to me in SQL.r, so any directory with 
a login.sql could be either a server or client directory
it would also make more sense to call it init.sql and provide a client.sql 
and a server.sql as examples in the distribution
if im enabling the spool feature, i just get this error:
onetom ~/rebol/db $ rebdb
Replaying 9 change(s).
** Script Error: Out of range or past end
** Where: func [/local log][
...
the only way to restart the server is to
onetom ~/rebol/db $ rm ../rebdb/replay.bak ../rebdb/session.log
if i do a commit *, then the replay.bak won't exist, but the server 
will still try to execute the session.log, which results in fractional 
changes:
onetom ~/rebol/db $ rebdb
Replaying 4.5 change(s).
** Script Error: Out of range or past end
if i say set spool session.txt, then it works.. pretty confusing 
default. and i would expect the file created in the current directory, 
not where the db.r file is stored
and now i get
SQL> select * asd
asd has an open log file
commit asd doesn't help
nve
7-Jun-2011
[269]
Is there a protocol version of RedDB ? In order to use it under Cheyenne 
with database enhancement.
Ashley
8-Jun-2011
[270]
No, but it wouldn't be that hard to write a protocol wrapper replacement 
for the SQL function.
Dockimbel
8-Jun-2011
[271]
Cheyenne is able to run RSP and CGI scripts concurrently on several 
processes at the same time. AFAIK, RebDB does not do any locking 
on write access, it would be unsafe to use in the general case with 
Cheyenne. SQLite would be more resilient, but keep in mind that as 
it is locking the whole DB on each write access, it is not scalable.
ddharing
8-Jun-2011
[272]
The new(er) WAL (Write Ahead Logging) transaction mode reduces locking 
and increases concurrency -- http://sqlite.org/wal.html.
nve
11-Jun-2011
[273x2]
Seems that the SQL interpreter (SQL.r) do not support multi lines 
:
SQL> create table c2 [
** Syntax Error: Missing ] at end-of-script
** Near: (line 1) create table c2 [
Ashley
15-Jun-2011
[275:last]
Correct, it's just an 'ask loop (hence no semi-colon for command 
termination).