Represents the current state of the end-user session with the English Query server.
The Session object encapsulates the state of a user session with the English Query server. It is initialized for a particular model and supports parsing English Query requests for that model into a collection of well-defined commands that the client can then execute. English requests are interpreted within the context of the Session object.
Typically, the English Query server parses an English question into a command to execute a database query. The client then executes the query statement (by dispatching the database query to a
Before the Session object can parse a user's English questions, it must be initialized for a particular model by calling the InitDomain method.
The user's question can then be processed by first parsing it with the ParseRequest method and then taking the appropriate action, depending on the type of response returned from ParseRequest.
Before the Session object is released, the client should call EndCommands to retrieve a collection of commands that cleanly terminates the current user conversation with the application. These commands are necessary to remove any temporary tables that are created during the session as a result of executing SQL statements.
The English Query server supports multiple, concurrent Session objects, each maintaining the unique state of a particular user conversation context for clarifications, preferences, and the model. The lifetime of a Session object, as with all