func (this *Instance) Exec(term r.Term) error { session, err := this.connect() if err != nil { return err } return term.Exec(session) }
func asyncDatabaseQuery(client *Client, operation r.Term) { go func() { err := operation.Exec(client.session) if err != nil { client.send <- SocketMessage{"error", err.Error()} } }() }