extra: Update usages of CONSTRUCTOR: for new parameter.
parent
73bd47f639
commit
f6d28bebc8
|
@ -29,7 +29,7 @@ TUPLE: mongo-scoped-code code object ;
|
|||
: <mongo-scoped-code> ( code object -- mongo-scoped-code )
|
||||
mongo-scoped-code boa ;
|
||||
|
||||
CONSTRUCTOR: dbref ( ref id -- dbref ) ;
|
||||
CONSTRUCTOR: <dbref> dbref ( ref id -- dbref ) ;
|
||||
|
||||
: dbref>assoc ( dbref -- assoc )
|
||||
[ <linked-hash> ] dip over
|
||||
|
|
|
@ -54,7 +54,7 @@ SYMBOL: dns-servers
|
|||
"." ?tail drop ;
|
||||
|
||||
TUPLE: query name type class ;
|
||||
CONSTRUCTOR: query ( name type class -- obj )
|
||||
CONSTRUCTOR: <query> query ( name type class -- obj )
|
||||
[ >dotted ] change-name ;
|
||||
|
||||
TUPLE: rr name type class ttl rdata ;
|
||||
|
@ -66,24 +66,24 @@ TUPLE: mx preference exchange ;
|
|||
TUPLE: soa mname rname serial refresh retry expire minimum ;
|
||||
|
||||
TUPLE: a name ;
|
||||
CONSTRUCTOR: a ( name -- obj ) ;
|
||||
CONSTRUCTOR: <a> a ( name -- obj ) ;
|
||||
|
||||
TUPLE: aaaa name ;
|
||||
CONSTRUCTOR: aaaa ( name -- obj ) ;
|
||||
CONSTRUCTOR: <aaaa> aaaa ( name -- obj ) ;
|
||||
|
||||
TUPLE: cname name ;
|
||||
CONSTRUCTOR: cname ( name -- obj ) ;
|
||||
CONSTRUCTOR: <cname> cname ( name -- obj ) ;
|
||||
|
||||
TUPLE: ptr name ;
|
||||
CONSTRUCTOR: ptr ( name -- obj ) ;
|
||||
CONSTRUCTOR: <ptr> ptr ( name -- obj ) ;
|
||||
|
||||
TUPLE: ns name ;
|
||||
CONSTRUCTOR: ns ( name -- obj ) ;
|
||||
CONSTRUCTOR: <ns> ns ( name -- obj ) ;
|
||||
|
||||
TUPLE: message id qr opcode aa tc rd ra z rcode
|
||||
query answer-section authority-section additional-section ;
|
||||
|
||||
CONSTRUCTOR: message ( query -- obj )
|
||||
CONSTRUCTOR: <message> message ( query -- obj )
|
||||
16 2^ random >>id
|
||||
0 >>qr
|
||||
QUERY >>opcode
|
||||
|
|
|
@ -53,7 +53,7 @@ TUPLE: comment-extension
|
|||
introducer label comment-data ;
|
||||
|
||||
TUPLE: trailer byte ;
|
||||
CONSTRUCTOR: trailer ( byte -- obj ) ;
|
||||
CONSTRUCTOR: <trailer> trailer ( byte -- obj ) ;
|
||||
|
||||
CONSTANT: IMAGE-DESCRIPTOR 0x2c
|
||||
! Extensions
|
||||
|
|
|
@ -13,7 +13,7 @@ TUPLE: mdb-db name username pwd-digest nodes collections ;
|
|||
|
||||
TUPLE: mdb-node master? { address inet } remote ;
|
||||
|
||||
CONSTRUCTOR: mdb-node ( address master? -- mdb-node ) ;
|
||||
CONSTRUCTOR: <mdb-node> mdb-node ( address master? -- mdb-node ) ;
|
||||
|
||||
TUPLE: mdb-connection instance node handle remote local buffer ;
|
||||
|
||||
|
@ -22,7 +22,7 @@ TUPLE: mdb-connection instance node handle remote local buffer ;
|
|||
|
||||
USE: mongodb.operations
|
||||
|
||||
CONSTRUCTOR: mdb-connection ( instance -- mdb-connection ) ;
|
||||
CONSTRUCTOR: <mdb-connection> mdb-connection ( instance -- mdb-connection ) ;
|
||||
|
||||
: check-ok ( result -- errmsg ? )
|
||||
[ [ "errmsg" ] dip at ]
|
||||
|
|
|
@ -18,12 +18,12 @@ TUPLE: mdb-collection
|
|||
{ size integer }
|
||||
{ max integer } ;
|
||||
|
||||
CONSTRUCTOR: mdb-collection ( name -- collection ) ;
|
||||
CONSTRUCTOR: <mdb-collection> mdb-collection ( name -- collection ) ;
|
||||
|
||||
TUPLE: index-spec
|
||||
{ ns string } { name string } { key hashtable } { unique? boolean initial: f } ;
|
||||
|
||||
CONSTRUCTOR: index-spec ( ns name key -- index-spec ) ;
|
||||
CONSTRUCTOR: <index-spec> index-spec ( ns name key -- index-spec ) ;
|
||||
|
||||
M: mdb-pool make-connection
|
||||
mdb>> mdb-open ;
|
||||
|
|
|
@ -66,13 +66,13 @@ TUPLE: mdb-reply-msg < mdb-msg
|
|||
{ objects sequence } ;
|
||||
|
||||
|
||||
CONSTRUCTOR: mdb-getmore-msg ( collection return# cursor -- mdb-getmore-msg )
|
||||
CONSTRUCTOR: <mdb-getmore-msg> mdb-getmore-msg ( collection return# cursor -- mdb-getmore-msg )
|
||||
OP_GetMore >>opcode ; inline
|
||||
|
||||
CONSTRUCTOR: mdb-delete-msg ( collection selector -- mdb-delete-msg )
|
||||
CONSTRUCTOR: <mdb-delete-msg> mdb-delete-msg ( collection selector -- mdb-delete-msg )
|
||||
OP_Delete >>opcode ; inline
|
||||
|
||||
CONSTRUCTOR: mdb-query-msg ( collection query -- mdb-query-msg )
|
||||
CONSTRUCTOR: <mdb-query-msg> mdb-query-msg ( collection query -- mdb-query-msg )
|
||||
OP_Query >>opcode ; inline
|
||||
|
||||
GENERIC: <mdb-killcursors-msg> ( object -- mdb-killcursors-msg )
|
||||
|
@ -99,8 +99,8 @@ M: assoc <mdb-insert-msg> ( collection assoc -- mdb-insert-msg )
|
|||
>>objects OP_Insert >>opcode ;
|
||||
|
||||
|
||||
CONSTRUCTOR: mdb-update-msg ( collection selector object -- mdb-update-msg )
|
||||
CONSTRUCTOR: <mdb-update-msg> mdb-update-msg ( collection selector object -- mdb-update-msg )
|
||||
OP_Update >>opcode ; inline
|
||||
|
||||
CONSTRUCTOR: mdb-reply-msg ( -- mdb-reply-msg ) ; inline
|
||||
CONSTRUCTOR: <mdb-reply-msg> mdb-reply-msg ( -- mdb-reply-msg ) ; inline
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ IN: mongodb.tuple.collection
|
|||
|
||||
TUPLE: toid key value ;
|
||||
|
||||
CONSTRUCTOR: toid ( value key -- toid ) ;
|
||||
CONSTRUCTOR: <toid> toid ( value key -- toid ) ;
|
||||
|
||||
FROM: mongodb.tuple => +transient+ +load+ <tuple-index> ;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ DEFER: assoc>tuple
|
|||
|
||||
TUPLE: cond-value value quot ;
|
||||
|
||||
CONSTRUCTOR: cond-value ( value quot -- cond-value ) ;
|
||||
CONSTRUCTOR: <cond-value> cond-value ( value quot -- cond-value ) ;
|
||||
|
||||
: write-mdb-persistent ( value quot -- value' )
|
||||
over [ call( tuple -- assoc ) ] dip
|
||||
|
|
|
@ -6,7 +6,7 @@ unicode.categories ;
|
|||
IN: resolv-conf
|
||||
|
||||
TUPLE: network ip netmask ;
|
||||
CONSTRUCTOR: network ( ip netmask -- network ) ;
|
||||
CONSTRUCTOR: <network> network ( ip netmask -- network ) ;
|
||||
|
||||
TUPLE: options
|
||||
debug?
|
||||
|
@ -18,11 +18,11 @@ insecure2?
|
|||
{ attempts integer initial: 2 }
|
||||
rotate? no-check-names? inet6? tcp? ;
|
||||
|
||||
CONSTRUCTOR: options ( -- options ) ;
|
||||
CONSTRUCTOR: <options> options ( -- options ) ;
|
||||
|
||||
TUPLE: resolv.conf nameserver domain lookup search sortlist options ;
|
||||
|
||||
CONSTRUCTOR: resolv.conf ( -- resolv.conf )
|
||||
CONSTRUCTOR: <resolv.conf> resolv.conf ( -- resolv.conf )
|
||||
V{ } clone >>nameserver
|
||||
V{ } clone >>domain
|
||||
V{ } clone >>search
|
||||
|
|
|
@ -95,7 +95,7 @@ math.constants ;
|
|||
IN: shapes.circle
|
||||
|
||||
TUPLE: circle radius ;
|
||||
CONSTRUCTOR: circle ( radius -- obj ) ;
|
||||
CONSTRUCTOR: <circle> circle ( radius -- obj ) ;
|
||||
M: circle area radius>> sq pi * ;
|
||||
M: circle perimeter radius>> pi * 2 * ;"""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue