Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changes in comments used to separate

  • Loading branch information...
commit 98f32238f6931eec2cade8f7e6f7b4c400764d74 1 parent 004be0d
John Mac authored committed
View
16 mongo/collection.go
@@ -31,8 +31,8 @@ func (self *Collection) fullName() string {
return self.db.name + "." + self.name
}
-// *** Client Request Messages
-// ***
+// === Client Request Messages
+// ===
func (self *Connection) sendMessage(m message) os.Error {
body := m.Bytes()
@@ -56,7 +56,7 @@ func (self *Connection) sendMessageToReply(m message, reqID int32) os.Error {
return err
}
-// *** OP_UPDATE
+// === OP_UPDATE
var fUpsert, fUpdateAll, fUpsertAll int32 // flags
@@ -88,14 +88,14 @@ func (self *Collection) update(msg *opUpdate) os.Error {
return self.db.Conn.sendMessage(msg)
}
-// *** OP_INSERT
+// === OP_INSERT
func (self *Collection) Insert(doc BSON) os.Error {
msg := &opInsert{self.fullName(), doc}
return self.db.Conn.sendMessage(msg)
}
-// *** OP_QUERY
+// === OP_QUERY
func (self *Collection) Query(query BSON, skip, limit int32) (*Cursor, os.Error) {
conn := self.db.Conn
@@ -146,7 +146,7 @@ func (self *Collection) Count(query BSON) (int64, os.Error) {
return int64(reply.Get("n").Number()), nil
}
-// *** OP_DELETE
+// === OP_DELETE
var fSingleRemove int32 // flags
@@ -168,8 +168,8 @@ func (self *Collection) remove(msg *opDelete) os.Error {
}
-// *** Indexes
-// ***
+// === Indexes
+// ===
type indexDesc struct {
Name string
View
2  mongo/connection.go
@@ -68,7 +68,7 @@ func (self *Connection) GetDB(name string) *Database {
return &Database{self, name}
}
-// *** OP_REPLY
+// === OP_REPLY
/* Gets the message of reply from database. */
func (self *Connection) readReply() (*opReply, os.Error) {
View
8 mongo/cursor.go
@@ -40,10 +40,10 @@ func (self *Cursor) HasMore() bool {
}
-// *** Client Request Messages
-// ***
+// === Client Request Messages
+// ===
-// *** OP_GET_MORE
+// === OP_GET_MORE
func (self *Cursor) GetMore() os.Error {
if self.id == 0 {
@@ -72,7 +72,7 @@ func (self *Cursor) GetMore() os.Error {
return nil
}
-// *** OP_KILL_CURSORS
+// === OP_KILL_CURSORS
func (self *Cursor) Close() os.Error {
if self.id == 0 {
View
6 mongo/main.go
@@ -37,8 +37,8 @@ func init() {
}
-// *** Utility functions
-// ***
+// === Utility functions
+// ===
/* Gets a random request identifier different to the last one.
@@ -55,7 +55,7 @@ func getRequestID() int32 {
return id
}
-// *** Bits data
+// === Bits data
func setBit32(num *int32, position ...byte) {
const MASK = 1
View
30 mongo/message.go
@@ -38,8 +38,8 @@ const (
var _HEADER_WORD = make([]byte, _HEADER_SIZE)
-// *** Standard Message Header
-// ***
+// === Standard Message Header
+// ===
type msgHeader struct {
messageLength int32 // total message size, including this
@@ -60,8 +60,8 @@ func header(h msgHeader) []byte {
}
-// *** Messages interface
-// ***
+// === Messages interface
+// ===
type message interface {
Bytes() []byte
@@ -69,10 +69,10 @@ type message interface {
}
-// *** Client Request Messages
-// ***
+// === Client Request Messages
+// ===
-// *** OP_UPDATE
+// === OP_UPDATE
// flags
const (
@@ -114,7 +114,7 @@ func (self *opUpdate) Bytes() []byte {
return buf.Bytes()
}
-// *** OP_INSERT
+// === OP_INSERT
type opInsert struct {
//header msgHeader // standard message header
@@ -136,7 +136,7 @@ func (self *opInsert) Bytes() []byte {
return buf.Bytes()
}
-// *** OP_QUERY
+// === OP_QUERY
// opts
const (
@@ -183,7 +183,7 @@ func (self *opQuery) Bytes() []byte {
return buf.Bytes()
}
-// *** OP_GET_MORE
+// === OP_GET_MORE
type opGetMore struct {
//header msgHeader // standard message header
@@ -212,7 +212,7 @@ func (self *opGetMore) Bytes() []byte {
return buf.Bytes()
}
-// *** OP_DELETE
+// === OP_DELETE
// flags
const (
@@ -248,7 +248,7 @@ func (self *opDelete) Bytes() []byte {
return buf.Bytes()
}
-// *** OP_KILL_CURSORS
+// === OP_KILL_CURSORS
type opKillCursors struct {
//header msgHeader // standard message header
@@ -276,10 +276,10 @@ func (self *opKillCursors) Bytes() []byte {
}
-// *** Database Response Message
-// ***
+// === Database Response Message
+// ===
-// *** OP_REPLY
+// === OP_REPLY
type opReply struct {
//header msgHeader // standard message header
Please sign in to comment.
Something went wrong with that request. Please try again.