SSQLE
1.0
Simple SQL Editor
|
Represents settings of single connection profile. More...
Classes | |
class | TextSettings |
Class representing settings of text in highlighing component Scintilla.NET It allows to define Color , boldness and italics for the text. More... | |
class | XmlDocumentCreator |
Wrapper class around XmlDocument providing simple adding of Nodes and attributes to XmlDocument. More... | |
Public Member Functions | |
void | AddExecutedCommand (string command) |
Adds executed command to the history. More... | |
void | SaveQuery (string name, string query) |
Saves query snippet to the profile. More... | |
Static Public Member Functions | |
static Settings | LoadFromXml (Stream stream) |
Loads Settings from stream containing XML document with settings. More... | |
static void | SaveToXml (Settings settings) |
Saves the settings to a file given by Path More... | |
static string | GetXmlPathFromName (string name) |
Gets path to XML file of settings from the profile name. More... | |
Public Attributes | |
string | Path => GetXmlPathFromName(Name) |
Returns path to the file representing this Settings. More... | |
CommandsHistory | CommandsHistory = new CommandsHistory(MaxCommandHistory) |
History of previously executed commands. More... | |
IDictionary< string, string > | Snippets = new Dictionary<string, string>() |
Snippets stored in the profile. More... | |
const string | SettingsPath = "settings/" |
Directory containing settings. More... | |
const string | XsdSchema = "settings.xsd" |
XML Schema file used to validate XML documents with setings. More... | |
const string | XmlExtension = ".xml" |
Extension used for XML files. More... | |
Properties | |
string | Name [get, set] |
Name of the profile. More... | |
string | Host = "" [get, set] |
Hostname to be used while connecting to database. More... | |
string | User = "" [get, set] |
Username to be used while connecting to database. More... | |
string | Pass = "" [get, set] |
Username to be used while connecting to database. More... | |
string | Sid = "" [get, set] |
SID to be used while connecting to database. More... | |
string | Port = "" [get, set] |
Port to be used while connecting to database. More... | |
TextSettings | KeyWord = "1521" [get, private set] |
TextSettingsused for SQL keywords. More... | |
TextSettings | Function = new TextSettings(true, false, ColorExtensions.FromString("purple")) [get, private set] |
TextSettingsused for function calls. More... | |
TextSettings | Comment = new TextSettings(false, false, ColorExtensions.FromString("#569CD6")) [get, private set] |
TextSettingsused for comments. More... | |
TextSettings | StringLiteral = new TextSettings(false, false, ColorExtensions.FromString("#57A64A")) [get, private set] |
TextSettingsused for string literals. More... | |
TextSettings | NumberLiteral = new TextSettings(false, false, ColorExtensions.FromString("red")) [get, private set] |
TextSettings used for number literals. More... | |
Private Member Functions | |
Settings () | |
Private constructor. Is to be created using LoadFromXml. More... | |
Static Private Member Functions | |
static IDictionary< string, string > | GetSnippetsFromXPath (XmlDocument document, string xpath) |
Returns mapping of saved queries from document located using XPath expression. More... | |
static CommandsHistory | GetCommandsHistoryFromXPath (XmlDocument document, string xpath) |
Returns CommandsHistory from document located using XPath expression. More... | |
static string | GetSettingsFromXPath (XmlDocument document, string xpath) |
Returns inner text of node selected by XPath expression in document. More... | |
Private Attributes | |
const int | MaxCommandHistory = 100 |
Maximum command to be stored at once in history. More... | |
Static Private Attributes | |
static XmlSchema | schema |
XML Schema once it is loaded in LoadFromXml. More... | |
Represents settings of single connection profile.
|
private |
Private constructor. Is to be created using LoadFromXml.
void SSQLE.Settings.AddExecutedCommand | ( | string | command | ) |
Adds executed command to the history.
command | Command to add to history. |
|
staticprivate |
Returns CommandsHistory from document located using XPath expression.
document | XmlDocument containing settings. |
xpath | XPath expression. |
|
staticprivate |
Returns inner text of node selected by XPath expression in document.
document | XmlDocument |
xpath | XPath expression. |
|
staticprivate |
Returns mapping of saved queries from document located using XPath expression.
document | XmlDocument containing settings. |
xpath | XPath expression. |
Dictionary<string, string>
of saved queries in the profile. Key is name, Value is query.
|
static |
Gets path to XML file of settings from the profile name.
name | Name of the profile. |
|
static |
Loads Settings from stream containing XML document with settings.
stream | Stream containing the XML with settings or null . |
null
.SettingsLoadException | When XML is not valid according to settings.xsd . See documentatin of settings.xsd on main page. |
void SSQLE.Settings.SaveQuery | ( | string | name, |
string | query | ||
) |
Saves query snippet to the profile.
name | Name of the snippet. |
query | Actuall query. |
|
static |
Saves the settings to a file given by Path
settings | Settings to save. |
SettingsSaveException | If settings are not valid. |
CommandsHistory SSQLE.Settings.CommandsHistory = new CommandsHistory(MaxCommandHistory) |
History of previously executed commands.
|
private |
Maximum command to be stored at once in history.
string SSQLE.Settings.Path => GetXmlPathFromName(Name) |
Returns path to the file representing this Settings.
|
staticprivate |
XML Schema once it is loaded in LoadFromXml.
const string SSQLE.Settings.SettingsPath = "settings/" |
Directory containing settings.
IDictionary<string, string> SSQLE.Settings.Snippets = new Dictionary<string, string>() |
Snippets stored in the profile.
const string SSQLE.Settings.XmlExtension = ".xml" |
Extension used for XML files.
const string SSQLE.Settings.XsdSchema = "settings.xsd" |
XML Schema file used to validate XML documents with setings.
|
getprivate set |
TextSettingsused for comments.
|
getprivate set |
TextSettingsused for function calls.
|
getset |
Hostname to be used while connecting to database.
|
getprivate set |
TextSettingsused for SQL keywords.
|
getset |
Name of the profile.
|
getprivate set |
TextSettings used for number literals.
|
getset |
Username to be used while connecting to database.
|
getset |
Port to be used while connecting to database.
|
getset |
SID to be used while connecting to database.
|
getprivate set |
TextSettingsused for string literals.
|
getset |
Username to be used while connecting to database.