{"action":"created","issue":{"url":"https://api.github.com/repos/pivotalsoftware/quickstep/issues/49","repository_url":"https://api.github.com/repos/pivotalsoftware/quickstep","labels_url":"https://api.github.com/repos/pivotalsoftware/quickstep/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/pivotalsoftware/quickstep/issues/49/comments","events_url":"https://api.github.com/repos/pivotalsoftware/quickstep/issues/49/events","html_url":"https://github.com/pivotalsoftware/quickstep/pull/49","id":137096483,"number":49,"title":"SQL help messages","user":{"login":"cramja","id":5708822,"avatar_url":"https://avatars.githubusercontent.com/u/5708822?v=3","gravatar_id":"","url":"https://api.github.com/users/cramja","html_url":"https://github.com/cramja","followers_url":"https://api.github.com/users/cramja/followers","following_url":"https://api.github.com/users/cramja/following{/other_user}","gists_url":"https://api.github.com/users/cramja/gists{/gist_id}","starred_url":"https://api.github.com/users/cramja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramja/subscriptions","organizations_url":"https://api.github.com/users/cramja/orgs","repos_url":"https://api.github.com/users/cramja/repos","events_url":"https://api.github.com/users/cramja/events{/privacy}","received_events_url":"https://api.github.com/users/cramja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jianqiao","id":2695519,"avatar_url":"https://avatars.githubusercontent.com/u/2695519?v=3","gravatar_id":"","url":"https://api.github.com/users/jianqiao","html_url":"https://github.com/jianqiao","followers_url":"https://api.github.com/users/jianqiao/followers","following_url":"https://api.github.com/users/jianqiao/following{/other_user}","gists_url":"https://api.github.com/users/jianqiao/gists{/gist_id}","starred_url":"https://api.github.com/users/jianqiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jianqiao/subscriptions","organizations_url":"https://api.github.com/users/jianqiao/orgs","repos_url":"https://api.github.com/users/jianqiao/repos","events_url":"https://api.github.com/users/jianqiao/events{/privacy}","received_events_url":"https://api.github.com/users/jianqiao/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2016-02-28T21:09:19Z","updated_at":"2016-03-02T14:39:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pivotalsoftware/quickstep/pulls/49","html_url":"https://github.com/pivotalsoftware/quickstep/pull/49","diff_url":"https://github.com/pivotalsoftware/quickstep/pull/49.diff","patch_url":"https://github.com/pivotalsoftware/quickstep/pull/49.patch"},"body":"This change adds a new type of command syntax to the parser as well as the beginnings of a help command.\r\n\r\n```SQL\r\nquickstep> .help\r\nEnter '.help {Sql Keyword} for usage information.'\r\n\r\nquickstep> .help create\r\nCREATE TABLE\r\n```\r\n\r\nIn the future, we should be able to easily extend this syntax to add other commands which are non-sql commands and, when executed, perform some action on the quickstep system.\r\n\r\nExamples of future dot commands could be:\r\n```SQL\r\n.quit\r\n.version\r\n.read\r\n....\r\n```\r\nSqlite3 uses a similar grammar as what I have implemented. A valid dot command is:\r\n *  A single line, starting with a dot, and ending with a newline or EOF\r\n * The token after the dot is the command name\r\n * The string following the command name is fed in as argument to the command\r\n\r\nThe `ParseHelpCommand` class still needs work. We need to find a good way of generating help messages, whether that be with a script on the YPP file or just a hand-crafted message, I don't know the best answer.\r\n\r\nPostGres seems to embed a large string in their binary. For example, I extracted their create table help entry string entry.\r\n``` SQL\r\nCREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] %s\r\n    OF %s [ (\r\n  { %s WITH OPTIONS [ %s [ ... ] ]\r\n    | %s }\r\n    [, ... ]\r\n[ WITH ( %s [= %s] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]\r\n[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]\r\n[ TABLESPACE %s ]\r\n[ CONSTRAINT %s ]\r\n{ NOT NULL |\r\n  NULL |\r\n  CHECK ( %s ) [ NO INHERIT ] |\r\n  DEFAULT %s |\r\n  UNIQUE %s |\r\n  PRIMARY KEY %s |\r\n  REFERENCES %s [ ( %s ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]\r\n    [ ON DELETE %s ] [ ON UPDATE %s ] }\r\n[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]\r\n[ CONSTRAINT %s ]\r\n{ CHECK ( %s ) [ NO INHERIT ] |\r\n  UNIQUE ( %s [, ... ] ) %s |\r\n  PRIMARY KEY ( %s [, ... ] ) %s |\r\n  EXCLUDE [ USING %s ] ( %s WITH %s [, ... ] ) %s [ WHERE ( %s ) ] |\r\n  FOREIGN KEY ( %s [, ... ] ) REFERENCES %s [ ( %s [, ... ] ) ]\r\n    [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE %s ] [ ON UPDATE %s ] }\r\n[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]\r\n{ INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS | INDEXES | STORAGE | COMMENTS | ALL }\r\n[ WITH ( %s [= %s] [, ... ] ) ]\r\n[ USING INDEX TABLESPACE %s ]\r\n{ %s | ( %s ) } [ %s ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]\r\n```"},"comment":{"url":"https://api.github.com/repos/pivotalsoftware/quickstep/issues/comments/191263075","html_url":"https://github.com/pivotalsoftware/quickstep/pull/49#issuecomment-191263075","issue_url":"https://api.github.com/repos/pivotalsoftware/quickstep/issues/49","id":191263075,"user":{"login":"pateljm","id":8864916,"avatar_url":"https://avatars.githubusercontent.com/u/8864916?v=3","gravatar_id":"","url":"https://api.github.com/users/pateljm","html_url":"https://github.com/pateljm","followers_url":"https://api.github.com/users/pateljm/followers","following_url":"https://api.github.com/users/pateljm/following{/other_user}","gists_url":"https://api.github.com/users/pateljm/gists{/gist_id}","starred_url":"https://api.github.com/users/pateljm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pateljm/subscriptions","organizations_url":"https://api.github.com/users/pateljm/orgs","repos_url":"https://api.github.com/users/pateljm/repos","events_url":"https://api.github.com/users/pateljm/events{/privacy}","received_events_url":"https://api.github.com/users/pateljm/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T14:39:53Z","updated_at":"2016-03-02T14:39:53Z","body":"Agreed @cramja. LTGM. Merging."}}