Comments (5)
Hey, thank you for opening this feature request and opening the pull request! Really nice functionality.
Personally I think the drivers should be streamlined only for database access and protocol functionality.
Since this change is a quality-of-life feature, it may be better if it belonged in a separate repository.
If we merge this functionality into this repository, it means we need to main it's functionality and development long-term and potentially provide feature-parity with other drivers (which there could be many of).
@tobiemh what do you think?
from surrealdb.go.
It can be really useful for ORM-like usage.
it means we need to main it's functionality and development long-term and potentially provide feature-parity with other drivers
I agree but still, if it will be in the main repo it will be better maintained for a long time.
like, SurrelDB has aim for become the ultimate cloud database
ORM-like AutoMigrate will be on that list to become one.
For my personal preferences, I will use automigrate.
like Gorm, etc. ORM libs, mostly all of them have AutoMigrate
such a comparison bun doesn't have AutoMigrate and most people are waiting for a long time, one of them is me.
On the other hand, I understand not all people may want an ORM-like system in their database driver.
still, if will be added it will impact big and it will be easier to use schemafull tables
from surrealdb.go.
If we merge this functionality into this repository, it means we need to main it's functionality and development long-term and potentially provide feature-parity with other drivers (which there could be many of).
I think it depends on the language, the community, and the database engine itself, how it should behave, not every language provides the same way of doing things, and a major version can break everything.
Of course, all things can be done in any language but how much that will cost and gain? It is always a tradeoff.
Even, not every community is active like others.
So, I think to resolve these conflicts, I suggest using versioning to our advantage with SurrealDB.go
for example, with the current version of SurrealDB v1.*
, the SurrealDB.go
has an AutoMigration
which is a community-added feature (that maybe not support in the next major release), but after a major shift in the database engine happened, the library should follow with a major shift v2.*
as well if changes needed, which may be AutoMigrate
is tested and no longer supported because of many considerations, one of them could be the mass of work.
Later, another community participation takes place, and someone did the AutoMigration
for v2.*
, and so on...
from surrealdb.go.
I fully agree that migration capabilities are necessary. And we will be providing them through various different avenues (CLI tools, database functions, docker images are just some of the ideas for example). We need to keep in mind that this project, the golang drivers, are to provide a low-overhead, fully capable access to the database in such a way that doesn't interfere with people's application designs.
Regarding the versioning approach: that is a difficult one to respond to because you are right, we could do it that way. But at the same time, that is a lot of operational overhead. We need to track bugs for at least two live versions of the project. We will have people wanting different cardinality and justifying it by saying that we already do versioning this way. New users will be asking what is the correct version to use. Other language drivers will be asking when their 1.0-alternative is coming with such features.
I am thinking that migration functionality is scope creep for this particular project. It should be entirely possible to have this functionality in a separate project though, which could then be included in projects that require it.
from surrealdb.go.
Closing as there is already ongoing work to support migrations outside of drivers.
https://github.com/Odonno/surrealdb-migrations
We think this functionality may be out of scope for the drivers themselves. We would like to keep them lightweight and practical for all projects.
from surrealdb.go.
Related Issues (20)
- Feature: context.Context Support HOT 6
- Documentation: working with record links HOT 4
- Feature: Move and test `unmarshalMapToStruct(data map[string]interface{}, outStruct interface{})` HOT 2
- Bug: Re-connection to the DB HOT 2
- Bug: Broken Tests for Fetch HOT 5
- Bug: Unhandled errors in websockets can lead to panics HOT 4
- Bug: `Question or idea` Button HOT 2
- surrealdb Auth undefined HOT 1
- Bug: unexpected EOF on TestSurrealDBSuite/gorilla/TestUpdate HOT 1
- Documentation: The README file example is not usable with the latest main branch, neither with the latest version HOT 1
- Feature: Replace Gorilla WS with Nhooyr WS HOT 7
- Bug: The session has expired error when connecting to version 1.3.0 HOT 4
- Bug: stack overflow error in gorilla websocket with db version 1.3.0 HOT 4
- Feature: surrealML for golang
- Documentation: Add Documentation for .Live() func & other stuff related to LIVE queries HOT 6
- Change function does not exist HOT 3
- Feature: Add CBOR support HOT 2
- Bug: UnmarshalRaw panics when unmarshalling object HOT 3
- Feature: UPSERT
- panic: repeated read on failed websocket connection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surrealdb.go.