tags:

views:

69

answers:

1

From User Guide http://www.dobeash.com/RebDB/db-guide.html

I did this

>> record: make block! []
== []
>> append record 'next
== [next]
>> append record now/date
== [next 13-Sep-2009]
>> append record "test insert date"
== [next 13-Sep-2009 "test insert date"]
>> db-insert my-table record
== [4 13-Sep-2009 "test insert date"]
>>

Any shorter way to do this in one line ?

+1  A: 

You could either use COMPOSE:

db-insert my-table compose [next (now/date) "test insert date"]

Or REDUCE:

db-insert my-table reduce ['next now/date "test insert date"]
earl