{"action":"closed","issue":{"url":"https://api.github.com/repos/fffej/sql-server-gen/issues/21","labels_url":"https://api.github.com/repos/fffej/sql-server-gen/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/fffej/sql-server-gen/issues/21/comments","events_url":"https://api.github.com/repos/fffej/sql-server-gen/issues/21/events","html_url":"https://github.com/fffej/sql-server-gen/issues/21","id":95657216,"number":21,"title":"Generate Values","user":{"login":"fffej","id":15318,"avatar_url":"https://avatars.githubusercontent.com/u/15318?v=3","gravatar_id":"","url":"https://api.github.com/users/fffej","html_url":"https://github.com/fffej","followers_url":"https://api.github.com/users/fffej/followers","following_url":"https://api.github.com/users/fffej/following{/other_user}","gists_url":"https://api.github.com/users/fffej/gists{/gist_id}","starred_url":"https://api.github.com/users/fffej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fffej/subscriptions","organizations_url":"https://api.github.com/users/fffej/orgs","repos_url":"https://api.github.com/users/fffej/repos","events_url":"https://api.github.com/users/fffej/events{/privacy}","received_events_url":"https://api.github.com/users/fffej/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-17T13:34:55Z","updated_at":"2015-07-18T05:57:55Z","closed_at":"2015-07-18T05:57:55Z","body":"Many of the object types that require further support will require creating values (e.g. instances of data types).  Examples of this are partition functions and functions themselves.\r\n\r\nThe perfect way to do this would be to create Haskell types isomorphic to all of the SQL ones.  That way I'd generate the complete range of valid values.  It's easy to do this for some types (such as integers) but much harder for special types such as dates, geometry and geography.\r\n\r\nHowever, we can take advantage of SQL Server's inherent laziness to match my laziness.\r\n\r\n    CREATE FUNCTION FOO()\r\n    RETURNS DATE\r\n    AS\r\n    BEGIN\r\n      RETURN \"it does not matter what I put here because its only a runtime error\"\r\n    END\r\n   \r\nExecuting foo `SELECT dbo.FOO()` causes a runtime error.  I don't care about this for this use case."}}