#1 2021-01-10 19:03:36

leus
Member
Registered: 2012-09-05
Posts: 79

Database query when in TSQLRestServerDB

I have a TSQLRestServerDB with a nice model, and its working wonders.

Now, normally, in a classic database-backed application I would just simply do something like this:

select distinct InterestColumn from MyObject where SomeColumn is NULL

MyObject is a table managed by mORMot. How do I execute and fetch the list of unique InterestColumn? There can be quite a lot of MyObject rows in the database.

Offline

#2 2021-01-11 11:57:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Database query when in TSQLRestServerDB

I guess you could put 'distinct(InterestColumn)' as field name, and 'SomeColumn is null' as where clause in an ORM retrieval method.

Offline

Board footer

Powered by FluxBB