{"action":"created","issue":{"url":"https://api.github.com/repos/lteacher/shellstone/issues/25","repository_url":"https://api.github.com/repos/lteacher/shellstone","labels_url":"https://api.github.com/repos/lteacher/shellstone/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/lteacher/shellstone/issues/25/comments","events_url":"https://api.github.com/repos/lteacher/shellstone/issues/25/events","html_url":"https://github.com/lteacher/shellstone/issues/25","id":153165471,"number":25,"title":"Change query action functions","user":{"login":"lteacher","id":6103860,"avatar_url":"https://avatars.githubusercontent.com/u/6103860?v=3","gravatar_id":"","url":"https://api.github.com/users/lteacher","html_url":"https://github.com/lteacher","followers_url":"https://api.github.com/users/lteacher/followers","following_url":"https://api.github.com/users/lteacher/following{/other_user}","gists_url":"https://api.github.com/users/lteacher/gists{/gist_id}","starred_url":"https://api.github.com/users/lteacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lteacher/subscriptions","organizations_url":"https://api.github.com/users/lteacher/orgs","repos_url":"https://api.github.com/users/lteacher/repos","events_url":"https://api.github.com/users/lteacher/events{/privacy}","received_events_url":"https://api.github.com/users/lteacher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lteacher/shellstone/labels/in%20progress","name":"in progress","color":"fbca04"},{"url":"https://api.github.com/repos/lteacher/shellstone/labels/task","name":"task","color":"9b59b6"}],"state":"open","locked":false,"assignee":{"login":"lteacher","id":6103860,"avatar_url":"https://avatars.githubusercontent.com/u/6103860?v=3","gravatar_id":"","url":"https://api.github.com/users/lteacher","html_url":"https://github.com/lteacher","followers_url":"https://api.github.com/users/lteacher/followers","following_url":"https://api.github.com/users/lteacher/following{/other_user}","gists_url":"https://api.github.com/users/lteacher/gists{/gist_id}","starred_url":"https://api.github.com/users/lteacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lteacher/subscriptions","organizations_url":"https://api.github.com/users/lteacher/orgs","repos_url":"https://api.github.com/users/lteacher/repos","events_url":"https://api.github.com/users/lteacher/events{/privacy}","received_events_url":"https://api.github.com/users/lteacher/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/lteacher/shellstone/milestones/2","html_url":"https://github.com/lteacher/shellstone/milestones/02%20-%20Relational%20Mapping%20+%20DB%20and%20Table%20Creation","labels_url":"https://api.github.com/repos/lteacher/shellstone/milestones/2/labels","id":1742507,"number":2,"title":"02 - Relational Mapping + DB and Table Creation","description":"**Aim**\r\nThe main aims for this milestone are:\r\n- Have an acceptable simple schema created from annotated models and attributes\r\n- Create tables [and database possibly] if requested based off the schema\r\n- Only add adapters for existing model sources\r\n- More polishing of adapters and edge cases\r\n","creator":{"login":"lteacher","id":6103860,"avatar_url":"https://avatars.githubusercontent.com/u/6103860?v=3","gravatar_id":"","url":"https://api.github.com/users/lteacher","html_url":"https://github.com/lteacher","followers_url":"https://api.github.com/users/lteacher/followers","following_url":"https://api.github.com/users/lteacher/following{/other_user}","gists_url":"https://api.github.com/users/lteacher/gists{/gist_id}","starred_url":"https://api.github.com/users/lteacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lteacher/subscriptions","organizations_url":"https://api.github.com/users/lteacher/orgs","repos_url":"https://api.github.com/users/lteacher/repos","events_url":"https://api.github.com/users/lteacher/events{/privacy}","received_events_url":"https://api.github.com/users/lteacher/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":6,"state":"open","created_at":"2016-05-02T14:02:30Z","updated_at":"2016-05-10T13:56:23Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-05-05T04:22:02Z","updated_at":"2016-05-11T12:07:07Z","closed_at":null,"body":"**Details**\r\nCurrently there are functions for:\r\n```dart\r\nModel.insert(dynamic entity)\r\nModel.insertAll(List<dynamic> entity)\r\nModel.update(entity)\r\nModel.updateAll()...\r\nModel.delete... // you get the idea\r\n```\r\n\r\nI think they should be changed because they make the deletes and updates inflexible. I gave it some thought and decided that it should be something like\r\n\r\n```dart\r\n// Insert from mapped key / values\r\ninsert(name,Map <String,dynamic>values)\r\n\r\n// Inserts entity or List<entities>\r\ninsertFrom(dynamic entities)\r\n\r\n// For all the modifications\r\n```\r\n\r\nThis would allow for the conditional updates and deletes such as for one example:\r\n```dart\r\n// Update conditionally with name / values\r\nModel.update('User',{'firstName':'Bill'}).where...\r\n\r\n// Run is the only possible function chain and it updates by primary key\r\nModel.updateFrom(user).run()\r\n```"},"comment":{"url":"https://api.github.com/repos/lteacher/shellstone/issues/comments/218440143","html_url":"https://github.com/lteacher/shellstone/issues/25#issuecomment-218440143","issue_url":"https://api.github.com/repos/lteacher/shellstone/issues/25","id":218440143,"user":{"login":"lteacher","id":6103860,"avatar_url":"https://avatars.githubusercontent.com/u/6103860?v=3","gravatar_id":"","url":"https://api.github.com/users/lteacher","html_url":"https://github.com/lteacher","followers_url":"https://api.github.com/users/lteacher/followers","following_url":"https://api.github.com/users/lteacher/following{/other_user}","gists_url":"https://api.github.com/users/lteacher/gists{/gist_id}","starred_url":"https://api.github.com/users/lteacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lteacher/subscriptions","organizations_url":"https://api.github.com/users/lteacher/orgs","repos_url":"https://api.github.com/users/lteacher/repos","events_url":"https://api.github.com/users/lteacher/events{/privacy}","received_events_url":"https://api.github.com/users/lteacher/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T12:07:07Z","updated_at":"2016-05-11T12:07:07Z","body":"Ok I am not doing the `action(Type t)` implementation. Instead it will just be dynamic you can use `Type` or `String` because it was too annoying and meant changing a whole lot. That wouldn't be a problem but using types do have a drawback in that they are specific to the exact type match and that you cant really go (from what i can tell) from `String -> Type` whilst you can easily go `Type -> String`. I started to trial it out a bit and felt it wasnt worth it."}}