Rebol RebDB关系数据库:有没有更好的语法来插入今天的日期

时间:2009-09-13 15:55:00

标签: rebol

来自用户指南http://www.dobeash.com/RebDB/db-guide.html

我做了这个

>> 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"]
>>

在一行中做任何更短的方法吗?

1 个答案:

答案 0 :(得分:1)

您可以使用COMPOSE

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

REDUCE

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