{"action":"closed","issue":{"url":"https://api.github.com/repos/realm/realm-dotnet/issues/517","repository_url":"https://api.github.com/repos/realm/realm-dotnet","labels_url":"https://api.github.com/repos/realm/realm-dotnet/issues/517/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-dotnet/issues/517/comments","events_url":"https://api.github.com/repos/realm/realm-dotnet/issues/517/events","html_url":"https://github.com/realm/realm-dotnet/issues/517","id":153601153,"number":517,"title":"IsNull Support","user":{"login":"drungrin","id":13048606,"avatar_url":"https://avatars.githubusercontent.com/u/13048606?v=3","gravatar_id":"","url":"https://api.github.com/users/drungrin","html_url":"https://github.com/drungrin","followers_url":"https://api.github.com/users/drungrin/followers","following_url":"https://api.github.com/users/drungrin/following{/other_user}","gists_url":"https://api.github.com/users/drungrin/gists{/gist_id}","starred_url":"https://api.github.com/users/drungrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drungrin/subscriptions","organizations_url":"https://api.github.com/users/drungrin/orgs","repos_url":"https://api.github.com/users/drungrin/repos","events_url":"https://api.github.com/users/drungrin/events{/privacy}","received_events_url":"https://api.github.com/users/drungrin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-dotnet/labels/S:P1%20Backlog","name":"S:P1 Backlog","color":"dedede"},{"url":"https://api.github.com/repos/realm/realm-dotnet/labels/T:Enhancement","name":"T:Enhancement","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"fealebenpae","id":289915,"avatar_url":"https://avatars.githubusercontent.com/u/289915?v=3","gravatar_id":"","url":"https://api.github.com/users/fealebenpae","html_url":"https://github.com/fealebenpae","followers_url":"https://api.github.com/users/fealebenpae/followers","following_url":"https://api.github.com/users/fealebenpae/following{/other_user}","gists_url":"https://api.github.com/users/fealebenpae/gists{/gist_id}","starred_url":"https://api.github.com/users/fealebenpae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fealebenpae/subscriptions","organizations_url":"https://api.github.com/users/fealebenpae/orgs","repos_url":"https://api.github.com/users/fealebenpae/repos","events_url":"https://api.github.com/users/fealebenpae/events{/privacy}","received_events_url":"https://api.github.com/users/fealebenpae/received_events","type":"User","site_admin":false},"assignees":[{"login":"fealebenpae","id":289915,"avatar_url":"https://avatars.githubusercontent.com/u/289915?v=3","gravatar_id":"","url":"https://api.github.com/users/fealebenpae","html_url":"https://github.com/fealebenpae","followers_url":"https://api.github.com/users/fealebenpae/followers","following_url":"https://api.github.com/users/fealebenpae/following{/other_user}","gists_url":"https://api.github.com/users/fealebenpae/gists{/gist_id}","starred_url":"https://api.github.com/users/fealebenpae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fealebenpae/subscriptions","organizations_url":"https://api.github.com/users/fealebenpae/orgs","repos_url":"https://api.github.com/users/fealebenpae/repos","events_url":"https://api.github.com/users/fealebenpae/events{/privacy}","received_events_url":"https://api.github.com/users/fealebenpae/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/realm/realm-dotnet/milestones/2","html_url":"https://github.com/realm/realm-dotnet/milestones/v1.0","labels_url":"https://api.github.com/repos/realm/realm-dotnet/milestones/2/labels","id":1863258,"number":2,"title":"v1.0","description":"","creator":{"login":"kristiandupont","id":847742,"avatar_url":"https://avatars.githubusercontent.com/u/847742?v=3","gravatar_id":"","url":"https://api.github.com/users/kristiandupont","html_url":"https://github.com/kristiandupont","followers_url":"https://api.github.com/users/kristiandupont/followers","following_url":"https://api.github.com/users/kristiandupont/following{/other_user}","gists_url":"https://api.github.com/users/kristiandupont/gists{/gist_id}","starred_url":"https://api.github.com/users/kristiandupont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristiandupont/subscriptions","organizations_url":"https://api.github.com/users/kristiandupont/orgs","repos_url":"https://api.github.com/users/kristiandupont/repos","events_url":"https://api.github.com/users/kristiandupont/events{/privacy}","received_events_url":"https://api.github.com/users/kristiandupont/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":26,"state":"open","created_at":"2016-07-04T13:42:16Z","updated_at":"2016-08-09T15:26:16Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-05-07T15:44:30Z","updated_at":"2016-08-09T15:26:16Z","closed_at":"2016-08-09T15:26:16Z","body":"The NativeQuery doesn't have a IsNull method.\n\nThis is very important to query optional properties such as `int?`\n\nIt should have a \n\n`internal static extern void is_null(QueryHandle queryPtr, IntPtr columnIndex);`\n\nand then we can complement the https://github.com/realm/realm-dotnet/pull/515\n\n```\nprivate static void AddQueryEqual(QueryHandle queryHandle, string columnName, object value)\n\t\t{\n\t\t\tvar columnIndex = NativeQuery.get_column_index((QueryHandle)queryHandle, columnName, (IntPtr)columnName.Length);\n\n\t\t\tvar valueType = value?.GetType();\n\t\t\tif (value == null)\n\t\t\t\tNativeQuery.is_null ((QueryHandle)queryHandle, columnIndex);\n\t\t\telse if (value is string)\n\t\t\t{\n\t\t\t\tstring valueStr = (string)value;\n\t\t\t\tNativeQuery.string_equal((QueryHandle)queryHandle, columnIndex, valueStr, (IntPtr)valueStr.Length);\n\t\t\t}\n\t\t\telse if (valueType == typeof(bool))\n\t\t\t\tNativeQuery.bool_equal((QueryHandle)queryHandle, columnIndex, MarshalHelpers.BoolToIntPtr((bool)value));\n\t\t\telse if (valueType == typeof(int))\n\t\t\t\tNativeQuery.int_equal((QueryHandle)queryHandle, columnIndex, (IntPtr)((int)value));\n\t\t\telse if (valueType == typeof(float))\n\t\t\t\tNativeQuery.float_equal((QueryHandle)queryHandle, columnIndex, (float)value);\n\t\t\telse if (valueType == typeof(double))\n\t\t\t\tNativeQuery.double_equal((QueryHandle)queryHandle, columnIndex, (double)value);\n\t\t\telse if (valueType == typeof(DateTimeOffset))\n\t\t\t\tNativeQuery.datetime_seconds_equal(queryHandle, columnIndex, ((DateTimeOffset)value).ToUnixTimeSeconds());\n\t\t\telse\n\t\t\t\tthrow new NotImplementedException();\n\t\t}\n``` \n\nI  cann't to that myself because I don't know where to start :D"}}
{"actor":{"display_login":"fealebenpae"}}