Prefilters
SapphireDb comes with several prefilters that are executed on server side. You can use them to filter, order or select your data.
The usage is very easy. Just use the extension methods on the collection.
In this small example only values that start with testValue
are queried.
\f:(typescript:Angular) export class DemoComponent implements OnInit {\n \tvalues$: Observable<Entry[]>;\n\n \tconstructor(private db: SapphireDbService) { }\n\n \tngOnInit() {\n \t\tthis.values$ = this.db.collection<Entry>('entries')}\n \t\t\t.where(['content', 'StartsWith', 'testValue'])\n \t\t\t.values();\n \t}\n }
[]