-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composite key #18
Comments
Hi. Thanks. Composite key isn't supported yet. It will be added soon. The syntax is assumed to be like this: make_table("users",
make_column("id", &User::id),
make_column("name", &User::name),
primary_key(&User::id, &User::name)); Have a nice weekend too. |
Is it still on your list? |
Yes. Working on it |
This thing is too complicated - I need to think more. The thing is that this form make_table("users",
make_column("id", &User::id),
make_column("name", &User::name),
primary_key(&User::id, &User::name)); is kind of difficult cause |
Good morning,
|
Ok I see. I guess that I need to get typename template type of primary key by columns passed as parameter pack in |
When it will be released? |
in a few weeks. Sorry for a long development time |
Is it still in your ToDo? |
@Ninja-007 Yes. I got a lot of primary work and that's why it takes long time for me to complete the issue. I'm going to close it in about 2 weeks |
@Ninja-007 working on it right now. I have |
@Ninja-007 please check out |
Thanks, did you add examples? |
No cause
|
@Ninja-007 is it ok for you? I don't know whether I need to add |
If I use a composite primary key, the table is always recreated while syncing the schema. At line 6037 impl->schema_status always returns "sync_schema_result::dropped_and_recreated".
|
@boodkb please give me your code with |
|
fixed bug with |
fixed. Now composite keys are totally supported by this lib. Specially thanks to @Ninja-007 and @boodkb . |
added working example https://github.com/fnc12/sqlite_orm/blob/master/examples/composite_key.cpp |
@fnc12 I think it is good to provide example that covers all above concepts and it is better to add specific page for composite key and describe CRUD functionalities for this thanks a lot 👍 |
I want to use composite key which consists of 2 columns. Is there any way to specify in table creation?
If yes, please give me syntax of the command.
I wish you happy weekend.
The text was updated successfully, but these errors were encountered: