mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
SQLServer+SQL+LibSQL: Allow sql client to specify the database name
The database the sql client connected to was 'hardcoded' to the login name of the calling user. - Extended the IPC API to be more expressive when connecting, by returning the name of the database the client connected to in the 'connected' callback. - Gave the sql client a command line argument (-d/--database) allowing an alternative database name to be specified A subsequent commit will have a dot command allowing the user to connect to different databases from the same sql session.
This commit is contained in:
committed by
Andreas Kling
parent
c5c7a9d198
commit
e923cb3739
@@ -18,7 +18,7 @@ class SQLClient
|
||||
C_OBJECT(SQLClient);
|
||||
virtual ~SQLClient();
|
||||
|
||||
Function<void(int)> on_connected;
|
||||
Function<void(int, String const&)> on_connected;
|
||||
Function<void(int)> on_disconnected;
|
||||
Function<void(int, int, String const&)> on_connection_error;
|
||||
Function<void(int, int, String const&)> on_execution_error;
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void connected(int connection_id) override;
|
||||
virtual void connected(int connection_id, String const& connected_to_database) override;
|
||||
virtual void connection_error(int connection_id, int code, String const& message) override;
|
||||
virtual void execution_success(int statement_id, bool has_results, int created, int updated, int deleted) override;
|
||||
virtual void next_result(int statement_id, Vector<String> const&) override;
|
||||
|
||||
Reference in New Issue
Block a user