cristalhq / bson Goto Github PK
View Code? Open in Web Editor NEWBSON for Go
License: MIT License
BSON for Go
License: MIT License
Right now the following field will get Bar
BSON tag.
type Foo struct {
Bar string
}
However, official Mongo client and mgo will generate bar
. Decide which behaviour is better.
Currently in getStructInfo
we iterate over top-level fields. Fields of fields of struct are ignored.
Also, we can sort fields once when we add a struct for the first time, so sort in structInfo.asDoc
can be omitted.
I think it makes sense to enable branch protection rules (or newer rulesets) to require CI to pass.
RawObject
will decode only 1st level fields of the encoded documet.
On the other side RawDocument
is already an encoded document and no processing should be made.
func LogValue[T ScalarType](v T) slog.Value
func LogValueAny(v any) slog.Value
or
func GoString[T ScalarType](v T) string
func GoString(v any) string
given that the representation is always a Go-code-like string? For example, int32(42)
and int64(42)
.
During encoding we've a few places where we allocate a new D
for short period of time. Such allocations are harmless but we can get rid of them by allocating a D
from sync.Pool
.
As a result we should have zero-alloc encoding (in terms of D
allocs, buffer grow or reflect is a separate topic).
Also: M.AsD() D
should have an unexported version where we encode M
into a given D
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.