Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded engine implementation #161

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
eba7516
Adding CBOR request endoing. Adding Http Connection as a connection o…
remade Sep 9, 2024
95ef10b
Http, WS and CBOR tests
remade Sep 12, 2024
4884a2e
fix CBOR protocol WS issue
remade Sep 12, 2024
a10518d
lint
remade Sep 13, 2024
04e3e47
lint and read me update
remade Sep 13, 2024
b1a3d15
Readme update. Refactor
remade Sep 17, 2024
3db83dd
Lint
remade Sep 17, 2024
e614334
Custom CBOR update
remade Sep 17, 2024
95d6f8f
Custom CBOR update
remade Sep 17, 2024
6922d74
Add `upsert` method
tobiemh Sep 18, 2024
4c78c77
Add BaseURL connection parameter
tobiemh Sep 18, 2024
88a79e2
Bug fix
remade Sep 20, 2024
d73dfbe
rebase
remade Sep 20, 2024
320dbc6
WIP
remade Sep 23, 2024
3fbfa56
WIP
remade Sep 23, 2024
8ac8f48
WIP
remade Sep 23, 2024
3d48437
Temporarily support any input type into database methods
tobiemh Sep 23, 2024
c7edbae
WIP. function signature overhaul
remade Sep 26, 2024
573dfd1
WIP
remade Sep 27, 2024
ab7f72f
WIP
remade Sep 27, 2024
a6c43b8
WIP. Change func signature
remade Oct 2, 2024
1c64faf
WIP. Readme updated
remade Oct 2, 2024
c8d078a
WIP
remade Oct 2, 2024
4ebcedc
WIP. Tests
remade Oct 3, 2024
d188283
WIP. Tests update. Lint
remade Oct 4, 2024
896a44e
Extensive tests. Added tests. Readme updated
remade Oct 7, 2024
899e327
WIP. Linting
remade Oct 7, 2024
7c61051
Merge branch 'cbor-encoding-and-http-connection-engine' into embedded…
remade Oct 7, 2024
02c8490
WIP
remade Oct 7, 2024
35b8c0a
preconnection checks
remade Oct 8, 2024
4058f40
Merge branch 'cbor-encoding-and-http-connection-engine' into embedded…
remade Oct 8, 2024
0e1e0c2
Merge branch 'main' into embedded-engine-implementation
remade Oct 22, 2024
52a30aa
Lint
remade Oct 22, 2024
60d04a3
WIP
remade Oct 24, 2024
f1d7d94
WIP
remade Oct 25, 2024
77b989c
libsrc
remade Oct 25, 2024
78804d3
libsrc
remade Oct 25, 2024
a2c1055
Implemented and tested embedded RPC
remade Oct 28, 2024
e778fee
Implemented and tested embedded RPC
remade Oct 28, 2024
01f4d34
WIP
remade Nov 1, 2024
336fa36
Merge branch 'main' into embedded-engine-implementation
remade Nov 1, 2024
186dd08
WIP
remade Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ linters-settings:
- ifElseChain
- octalLiteral
- whyNoLint
- dupSubExpr # https://github.com/go-critic/go-critic/issues/897#issuecomment-568896534
gocyclo:
min-complexity: 15
goimports:
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,20 @@ or for a secure connection
db, err := surrealdb.New("https://localhost:8000")
```

### Using SurrealKV and Memory
SurrealKV and Memory also do not support live notifications at this time. This would be updated in the next
release.

For Surreal KV
```go
db, err := surrealdb.New("surrealkv://path/to/dbfile.kv")
```

For Memory
```go
db, err := surrealdb.New("mem://")
db, err := surrealdb.New("memory://")
```

## Data Models
This package facilitates communication between client and the backend service using the Concise
Expand Down
2 changes: 2 additions & 0 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func New(connectionURL string) (*DB, error) {
con = connection.NewHTTPConnection(newParams)
} else if scheme == "ws" || scheme == "wss" {
con = connection.NewWebSocketConnection(newParams)
} else if scheme == "memory" || scheme == "mem" || scheme == "surrealkv" {
con = connection.NewEmbeddedConnection(newParams)
} else {
return nil, fmt.Errorf("invalid connection url")
}
Expand Down
3 changes: 2 additions & 1 deletion db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"testing"
"time"

"github.com/stretchr/testify/suite"
"github.com/surrealdb/surrealdb.go"

"github.com/stretchr/testify/suite"
"github.com/surrealdb/surrealdb.go/pkg/connection"
"github.com/surrealdb/surrealdb.go/pkg/models"
)
Expand Down
Binary file added libsrc/libsurrealdb_c.dylib
Binary file not shown.
Loading
Loading