Closed jklmnn closed 8 years ago
Good idea. What could be useful for future ideas would be Timestamp User Category or list to have multiple lists isImportant
I would not put the user as database entry. I'd rather would create a table for each user. I don't think that we should consider users at all since we don't have any user management at all currently. Category can be easily added as column. But it should be able to be NULL what would be uncategorized then. It would be interesting if the timestamp functionality is already provided by databases. what would be isImportant for?
<slightly offtopic> I have seen that you have checked/unchecked functionality in your app but I didn't find any functionality for that in the backend in version 1.0. Is this only local? </slighly offtopic>
The user thing was meant more like a small colored dot in the bottom left corner which indicates which user added what to the list. I would not implement a real user management. I think that is not within scope. The isImportant is the question.... should there be a category "Important" among all other categories OR should it be possible to mark individual items of a category as important?
I think the checked thing is something that should also be synced.
Well, but if you add something as a specific user, we either need a set of allowed users. Otherwise it would just be a category.
I would stay with one category and one checked field at the moment.
The idea was that you just get assigned a random color which in the list indicates who added what. Completely unrelated to categories. I just thought it would be nice eye candy ;) Not really important right now...
So you would make "important" a category?
Yep, I think that's dedicated enough.
Good for me, less work ;)
I recall: STRING item PRIMARY INDEX NOT NULL; INT count NOT NULL; BOOL checked NOT NULL; STRING category;
Will you change the api functions accordingly? I'll adapt the db connector then.
I'll add some functions for the new usages. The listall should then give back a json array of items like this: {'itemTitle': Title of item, 'itemCount' => Count of item, 'checked' => false, 'done' => false, 'itemCategory' => Category of item} I am not sure if the 'done' part is necessary, I had to include it to be able to convert it to the used java object. I have to check gson and give you an update.
I think done and checked are the same thing.
Yeah, you're right... I am being stupid again.
Ok, I'll implement
STRING item PRIMARY INDEX NOT NULL; INT count NOT NULL; BOOL checked NOT NULL; STRING category;
for the new database connector.
I don't think updating the old ones makes sense since this one is replacing them.
I have completed the pdo db connector, so I will close this.
While trying to create a pdo abstraction (see #38 ) I noticed that the MySQL and the SQLite databases have different table layouts. That makes it difficult to create an abstraction and would cause much more code that could be avoided. I would suggest using a unified table layout. I would use:
STRING item PRIMARY INDEX NOT NULL; INT count NOT NULL; BOOL checked NOT NULL;