#1 2023-12-15 11:46:18

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

sqlite Generated Columns in a memory database

Is it possible to have sqlite generated columns as described here for an Torm in order to be used in queries?

https://www.sqlite.org/gencol.html

Which is the proposed way to create them (if it is possible)?

Offline

#2 2023-12-15 12:58:44

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

Re: sqlite Generated Columns in a memory database

This is a very SQLite-specific feature, so perhaps not to be part of the ORM.

My guess is that the easiest is to create the table manually in plain SQL, before call CreateMissingTables for the ORM.

Then, when you make Add() or Update() at ORM level, you should ensure you don't include those columns, so you need to specify the column names as CSV or TSqlFieldBits.

Offline

#3 2023-12-15 13:02:24

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 430

Re: sqlite Generated Columns in a memory database

Thank you a lot @ab

Is there a way to have the create sql query from CreateMissingTables  to modify it and create the table in a way it will not cause trouble to mormot?

Offline

Board footer

Powered by FluxBB