8000 Raw query support ? · Issue #6995 · realm/realm-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Raw query support ? #6995

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

Open
ra1nj opened this issue Apr 16, 2025 · 1 comment
Open

Raw query support ? #6995

ra1nj opened this issue Apr 16, 2025 · 1 comment

Comments

@ra1nj
Copy link
ra1nj commented Apr 16, 2025

Problem

We have a scenario is that the app needs to run dynamic query from server, we used to use typeorm+sqlite and we can manage that like
DataSource.query("select * from xxx")
As we changed to realm database, i found that there is no equivalent api for that, the only similar one is that
Realm.objects("ObjectName").filtered("xx == xx")
But it's only for read data from database, can't update or insert data in the database.
Is that possible we can have a api like Realm.query("RQL here") ?

Solution

No response

Alternatives

No response

How important is this improvement for you?

Would be a major improvement

Feature would mainly be used with

Local Database only

@Poscholars
Copy link

Hmmmm. I don't think realm might be able to run dynamic query for insert and update. It is a object oriented database and the underlining database engine is really different from any object relational database (mysql,sqlite,postgress etc). Being that the underlining engine in realm does not support raw sql queries I do not think realm support this feature out of the box. I have been using realm database for close to 4 years now for most of my apps.

My advise would be for u to build a wrapper. Something that can take sql query, then parse the SQL query by extracting the table name, the type of query and the object or information you want to write to the table. Maybe this might work for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0