sqlite-net icon indicating copy to clipboard operation
sqlite-net copied to clipboard

Supporting default column value.

Open BenjaminKim opened this issue 11 years ago • 7 comments

CREATE TABLE test (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

If I want to use this scheme with ORM(note the DEFAULT CURRENT_TIMESTAMP), how can I write my class? I can't find the attribute supporting this. Maybe is there a plan to support it?

BenjaminKim avatar Jun 13 '14 01:06 BenjaminKim

Sorry it's not currently supported, but I hope to add it soon.

Needed for #326

praeclarum avatar Aug 03 '17 02:08 praeclarum

this is so useful for creating concurrency tokens...

opcodewriter avatar Jun 07 '18 08:06 opcodewriter

Is default column value attribute planned in an upcoming version ?

bnelissen-orisha avatar Oct 23 '18 07:10 bnelissen-orisha

how is going with this feature?

it seems someone tried to implement this feature? https://github.com/praeclarum/sqlite-net/blob/250a1929304d2f7ffefd58c49612a01c93efd41e/src/SQLite.Net/Attributes/DefaultAttribute.cs

bill2004158 avatar Aug 21 '19 02:08 bill2004158

Upvote

picolino avatar Oct 23 '19 05:10 picolino

Up ?

bnelissen-orisha avatar Oct 25 '21 06:10 bnelissen-orisha

You can try this: https://github.com/praeclarum/sqlite-net/issues/326#issuecomment-2003009012

microspaze avatar Mar 18 '24 06:03 microspaze