Initial import

This commit is contained in:
George Suntres
2026-03-29 11:38:57 -04:00
commit 38265c15d1
25 changed files with 1763 additions and 0 deletions

26
find_cursor_test.go Normal file
View File

@@ -0,0 +1,26 @@
package mongo
import (
"time"
"testing"
"go.mongodb.org/mongo-driver/v2/bson"
)
func TestCursor_Default(t *testing.T) {
now := time.Now()
oid := bson.NewObjectIDFromTimestamp(now)
okey := EncodeCursor(oid)
id, err := DecodeCursor(okey)
if err != nil {
t.Fatalf("Decode failed: %v", err)
}
if id != oid {
t.Fatalf("Failed to decode id")
}
}