Merge branch 'for-slava' of git://github.com/x6j8x/factor
commit
5cb7220ed8
|
@ -39,16 +39,16 @@ CONSTRUCTOR: mdb-connection ( instance -- mdb-connection ) ;
|
|||
mdb-connection get instance>> ; inline
|
||||
|
||||
: index-collection ( -- ns )
|
||||
mdb-instance name>> "system.indexes" 2array "." join ; inline
|
||||
mdb-instance name>> "system.indexes" "." glue ; inline
|
||||
|
||||
: namespaces-collection ( -- ns )
|
||||
mdb-instance name>> "system.namespaces" 2array "." join ; inline
|
||||
mdb-instance name>> "system.namespaces" "." glue ; inline
|
||||
|
||||
: cmd-collection ( -- ns )
|
||||
mdb-instance name>> "$cmd" 2array "." join ; inline
|
||||
mdb-instance name>> "$cmd" "." glue ; inline
|
||||
|
||||
: index-ns ( colname -- index-ns )
|
||||
[ mdb-instance name>> ] dip 2array "." join ; inline
|
||||
[ mdb-instance name>> ] dip "." glue ; inline
|
||||
|
||||
: send-message ( message -- )
|
||||
[ mdb-connection get handle>> ] dip '[ _ write-message ] with-stream* ;
|
||||
|
|
|
@ -125,7 +125,7 @@ M: mdb-collection create-collection
|
|||
|
||||
: ensure-valid-collection-name ( collection -- )
|
||||
[ ";$." intersect length 0 > ] keep
|
||||
'[ _ "contains invalid characters ( . $ ; )" 2array "." join throw ] when ; inline
|
||||
'[ _ "contains invalid characters ( . $ ; )" "." glue throw ] when ; inline
|
||||
|
||||
: build-collection-map ( -- assoc )
|
||||
H{ } clone load-collection-list
|
||||
|
@ -154,7 +154,7 @@ M: mdb-collection create-collection
|
|||
[ nip ] [ drop ] if
|
||||
[ ] [ reserved-namespace? ] bi
|
||||
[ instance (ensure-collection) ] unless
|
||||
[ instance-name ] dip 2array "." join ] ;
|
||||
[ instance-name ] dip "." glue ] ;
|
||||
|
||||
: fix-query-collection ( mdb-query -- mdb-query )
|
||||
[ check-collection ] change-collection ; inline
|
||||
|
|
Loading…
Reference in New Issue