profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/radex/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Radek Pietruszewski radex @Nozbe Warsaw radex.io Face shield manufacturer. Software writer. Proud generalist. Poking the box since 1995. Do you even Swift? 🚀♻️

Nozbe/WatermelonDB 7763

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️

ksm/SwiftInFlux 1891

An attempt to gather all that is in flux in Swift.

kylef/Commander 1461

Compose beautiful command line interfaces in Swift

Nozbe/zacs 393

Zero Abstraction Cost Styling ⚡️👨‍🎨 (for React DOM & React Native)

Nozbe/withObservables 49

HOC (Higher-Order Component) for connecting RxJS Observables to React Components

radex/Battleship 11

My take on _Functional Programming in Swift_'s Battleship example

Nozbe/LokiJS 6

javascript embeddable / in-memory database

Nozbe/big-list-of-naughty-strings 2

The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.

Nozbe/Freddy 2

A reusable framework for parsing JSON in Swift.

issue commentNozbe/WatermelonDB

Batch delete related records not working

 await database.batch(async () => {
      team[0].prepareMarkAsDeleted();
      teamSeasons.map(l => l.prepareMarkAsDeleted());
      teamMembers.map(l => l.prepareMarkAsDeleted());
      profiles.map(l => l.prepareMarkAsDeleted());
    });

that's just broken. batch does not receive a function argument, but an array or list of record arguments

KrisLau

comment created time in 2 days

issue commentNozbe/WatermelonDB

Prepopulated database

@KrisLau Not currently, but you can easily implement it in app code by setting a one-time flag at launch. if the flag isn't there, it means the db is new

olhapi

comment created time in 5 days

pull request commentNozbe/WatermelonDB

Full text search (fts5)

@nmeibergen Can you go through comments in previous PR? There were some unresolved issues that were waiting for corrections before I could merge.

As for bumping to fts5… I'm not comfortable with that -- IIRC there are some non-trivial changes between fts5 and previous versions, it's not merely a straight-forward upgrade. So it would be better if the FTS settings (version, tokenizer, etc.) were configurable somehow in the schema

nmeibergen

comment created time in 5 days

issue commentNozbe/WatermelonDB

Performance efficient SUM operation

Does watermelondb supports selecting individual columns and SUM function?

Yes and no. You can do an unsafeSqlQuery, as you did, and then run .unsafeFetchRaw() on the Query - in that case you can have arbitrary columns returned in the query. When using normal fetch/observe, the query must return exactly all columns of a table, no more, no less - otherwise, it's just not possible to construct a class instance of your model.

przbadu

comment created time in 5 days

issue commentNozbe/WatermelonDB

Clarification on the Relations doc & some other questions

that's an arbitrary name of a class property. you pick whatever you want

KrisLau

comment created time in 15 days

PR opened Nozbe/WatermelonDB

Database corruption - fix attempt 2137
  • add the possibility of passing open flags to Database.kt
  • add a secret debug hook for all database errors for NT use
  • add a more understandable error when running methods on DB fails due to DB not having opened properly (previously this would show a mysterious .apply failure)
  • add a debug hook for manually closing jsi database from JS
+29 -15

0 comment

4 changed files

pr created time in 16 days

create barnchNozbe/WatermelonDB

branch : database-corruption-2137

created branch time in 16 days

created tagNozbe/WatermelonDB

tagv0.23.1-7

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️

created time in 16 days

created tagNozbe/WatermelonDB

tagv0.23.1-6

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️

created time in 16 days

issue commentNozbe/WatermelonDB

Strategy with different browser's tabs used at the same time?

@castroCrea Like I said above, there isn't a reliable way to get this done. (RxDB's approach only kind of works, but is fundamentally flawed and leader election cannot be made reliable on the web currently). The best I can recommend right now is to rely on sync, and add extraIncrementalIDBOptions.onDidOverwrite to warn multi-tab users that they must not close the tab with changes until they go back online.

frederikhors

comment created time in 18 days

push eventNozbe/WatermelonDB

Caleb Gregory

commit sha a0d64f936d9f5a6adbeead78f5625cb3a83cc852

Fixes typescript annotations in src/Collection and src/adapters/sqlite

view details

Radek Pietruszewski

commit sha 53299d5e9ba0b960a15a1f522a48da33d0b54cc4

Merge pull request #1146 from calebgregory/typescript-annotations Fixes typescript annotations in `src/Collection` and `src/adapters/sqlite`

view details

push time in 22 days

PR merged Nozbe/WatermelonDB

Fixes typescript annotations in `src/Collection` and `src/adapters/sqlite`

Actual @flow types:

  • https://github.com/Nozbe/WatermelonDB/blob/d1e6e210717a3a6e453175f88a21a55f82944530/src/Collection/index.js#L19-L21
  • https://github.com/Nozbe/WatermelonDB/blob/192e0f0f969510fa37702f12f5838adfdbd9956e/src/adapters/sqlite/type.js#L12-L33
+12 -1

0 comment

3 changed files

calebgregory

pr closed time in 22 days

issue commentNozbe/WatermelonDB

[BUG] Kotlin version

@rozPierog can you take a peek at it? We do use 1.5.10 in NT, but I don't think we override the lib's default anywhere in 🍉 codebase, and androidTest seems to work fine

Elabar

comment created time in 22 days

issue commentNozbe/WatermelonDB

[Question] Limitations

How would I relate these automatically created IDs with the table IDs in my remote DB if they are named user_id orpost_id or something like that.

that's unrelated, not declaring a column named id is just to avoid a duplicate, not that you can't have ids

KrisLau

comment created time in 23 days

issue commentmicrosoft/react-native-windows

Support WatermelonDB

https://github.com/Nozbe/WatermelonDB/issues/178 has some (partly outdated) information about the scope of work needed to support 🍉 on RN Windows.

In my opinion, the best way to implement the support is not to develop the whole Windows NativeModule, but instead to reuse C++ JSI-only implementation - only JSI build pipeline, a few basic platform bits are required to get this to work:

  • this is the whole JSI Android support: https://github.com/Nozbe/WatermelonDB/tree/master/native/android-jsi and this file is the biggest bit: https://github.com/Nozbe/WatermelonDB/blob/master/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp
  • on iOS: https://github.com/Nozbe/WatermelonDB/blob/master/native/ios/WatermelonDB/DatabasePlatformIOS.mm and https://github.com/Nozbe/WatermelonDB/blob/master/native/ios/WatermelonDB/JSIInstaller.mm
qmatteoq

comment created time in 24 days

issue commentNozbe/WatermelonDB

`updated` record being marked as `created`

last question, is WatermelonDB ok with receiving the same record in created changes on a pull, even if it's already created that record?

yes

MikeGlennFWC

comment created time in a month

issue commentNozbe/WatermelonDB

`updated` record being marked as `created`

One more thing, in your backend implementations, do you have _changes and _status fields on your backend database?

MikeGlennFWC

comment created time in a month

issue commentNozbe/WatermelonDB

`updated` record being marked as `created`

no, this is expected behavior on WatermelonDB side and a bug on your backend, however it's likely that it's been obscured before and now visible because of 0.23 changes.

record stays created most likely because it was changed between push beginning and completion. however, your server should treat created and updated records essentially the same way - the distinction is kind of arbitrary at this point. https://github.com/Nozbe/WatermelonDB/blob/master/docs-master/Advanced/Sync.md#implementing-push-endpoint

MikeGlennFWC

comment created time in a month

push eventNozbe/WatermelonDB

radex

commit sha 5dda434f406c43e69157c435ae7304f7afcc4b20

bump rxjs version to 7.3.0

view details

radex

commit sha 9a0b55ab17385eff3d4c93cb99576b8d77fc4466

remove unused peril & rollup scripts

view details

radex

commit sha cbeb44a1a363fde687a640e2c92e222388a0be81

Update changelog

view details

radex

commit sha 17a911a2bd89724e454737a9a5428361a8c072e5

fix ci issues

view details

radex

commit sha 1f6a441f2c3bb691e03ec943de2d3cbf629b912b

v0.23.1-5

view details

Radek Pietruszewski

commit sha d1e6e210717a3a6e453175f88a21a55f82944530

Merge pull request #1131 from Nozbe/rxjs7 [DO NOT MERGE] RxJS 7

view details

push time in a month

delete branch Nozbe/WatermelonDB

delete branch : rxjs7

delete time in a month

PR merged Nozbe/WatermelonDB

[DO NOT MERGE] RxJS 7
+30 -161

0 comment

9 changed files

radex

pr closed time in a month

startedjlongster/absurd-sql

started time in a month

issue commentNozbe/WatermelonDB

Return data from join table

The most practical way is what you're doing now. If you're concerned about performance, profile your app and make sure that DB work is to blame. If it is, see if adding an index to price_list_items.product_id helps. If not, make a single query for all price_list_items that match your product_ids (so you're down to just two queries). It is possible to make it all in a single query (using unsafeSqlQuery and unsafeFetchRaw), but you're missing on a lot of other features, I don't recommend it unless you actually need it.

Still, most of the time you'll see that performance issues are either due to mis-configuration (no indexing) or on React Native level (rendering items on the list that don't need to be seen yet)

osvaldokalvaitir

comment created time in a month

issue commentNozbe/WatermelonDB

Using same Id in different tables doesn't work

@nmarchais I don't know, I don't have time right now to debug such issues (unless there's a clear reproduction path to demonstrate a WatermelonDB bug) -- sorry, you have to analyze yourself what the app is doing to see why you're seeing the problem

nmarchais

comment created time in a month

issue closedNozbe/WatermelonDB

Demo In Windows Machine

Hi,

I come across this demo - https://watermelondb.vercel.app/ and also this - https://nozbe.github.io/WatermelonDB/Demo.html

I want a similar web app to be hosted. Having huge content in text format..which can be categorized

second things, can we make it work with pure HTML5 + Watermelondb in chrome or any browser as offline without any internet connection or any server..The will open the HTML and can do the search?

Why this project or contributors are not available in glitter im to discuss?

Please kindly help me

Thanks

closed time in a month

javadevelopment4

issue commentNozbe/WatermelonDB

Using same Id in different tables doesn't work

no, IDs have to be unique per-table

nmarchais

comment created time in a month

PR opened Nozbe/WatermelonDB

[DO NOT MERGE] RxJS 7
+59 -171

0 comment

16 changed files

pr created time in a month

create barnchNozbe/WatermelonDB

branch : rxjs7

created branch time in a month

push eventNozbe/WatermelonDB

Nathan Heffley

commit sha 391c98e4e69b02ae4e08f3d4556c9c7eb9670cc2

Add link to Laravel Watermelon package [Laravel Watermelon](https://github.com/nathanheffley/laravel-watermelon) is a Composer (PHP) package that provides an easy way to implement an endpoint to your [Laravel](https://github.com/laravel/laravel) project. Currently, it only provides somewhat rudimentary sync functionality, but I am actively implementing the rest of the major features. Stuff left to do: 1) More robust authorization. There is a way to restrict users from viewing/updating/deleting records based on whatever authorization method you want, but if a user is authorized to see a record they can update any fields or delete the record. Per-field authorization and authorizing create/update/delete still needs implemented. 2) Schema Versioning is not implemented yet. 3) Migrations are not implemented yet. So needless to say this package is still V1. I am hopeful its inclusion could still be valuable as a starting point for others to implement their own endpoint in other languages, and perhaps Watermelon DB users interested in Laravel could contribute to some of these missing features, but I totally understand if only fully-featured implementations are desired for this section.

view details

Nathan Heffley

commit sha 1de613c0528c02152e87cb4191963490ab8b48d1

Update Sync.md

view details

Nathan Heffley

commit sha 09484bc7acf6d53b6ede993ef40e61fa9aeafdce

Update Sync.html

view details

Radek Pietruszewski

commit sha c7348d991343b25fcdacee2a8f47af9c5586b7e7

Merge pull request #1129 from nathanheffley/patch-1 Add link to Laravel Watermelon package

view details

push time in a month