mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-16 17:23:38 -05:00
The two main changes in this pull request: Launching query execution as an asynchronous task that performs a callback upon completion or failure of a query. (Which also sets us up for callbacks progressive results) Moving away from using the Result of a query execution to return an error. Instead we'll use an error event to return an error Additionally, some nice refactoring and cleaning up of the unit tests to take advantage of the cool RequestContext mock tooling by @kevcunnane * Initial commit of refactor to run execution truely asynchronously * Moving the storage of the task into Query class Callbacks for completion of a query and failure of a query are setup as events in the Query class. This actually sets us up for a very nice framework for adding batch and resultset completion callbacks. However, this also exposes a problem with cancelling queries and returning errors -- we don't properly handle errors during execution of a query (aside from DB errors). * Wrapping things up in order to submit for code review * Adding fixes as per comments
147 lines
5.8 KiB
Plaintext
147 lines
5.8 KiB
Plaintext
# String resource file
|
|
#
|
|
# When processed by the String Resource Tool, this file generates
|
|
# both a .CS and a .RESX file with the same name as the file.
|
|
# The .CS file contains a class which can be used to access these
|
|
# string resources, including the ability to format in
|
|
# parameters, which are identified with the .NET {x} format
|
|
# (see String.Format help).
|
|
#
|
|
# Comments below assume the file name is SR.strings.
|
|
#
|
|
# Lines starting with a semicolon ";" are also treated as comments, but
|
|
# in a future version they will be extracted and made available in LocStudio
|
|
# Put your comments to localizers _before_ the string they apply to.
|
|
#
|
|
# SMO build specific comment
|
|
# after generating the .resx file, run srgen on it and get the .resx file
|
|
# please remember to also check that .resx in, along with the
|
|
# .strings and .cs files
|
|
|
|
[strings]
|
|
|
|
############################################################################
|
|
# Connection Service
|
|
|
|
ConnectionServiceConnectErrorNullParams = Connection parameters cannot be null
|
|
|
|
ConnectionServiceListDbErrorNullOwnerUri = OwnerUri cannot be null or empty
|
|
|
|
ConnectionServiceListDbErrorNotConnected(string uri) = SpecifiedUri '{0}' does not have existing connection
|
|
|
|
ConnectionServiceConnStringInvalidAuthType(string authType) = Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'.
|
|
|
|
ConnectionServiceConnStringInvalidIntent(string intent) = Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'.
|
|
|
|
ConnectionServiceConnectionCanceled = Connection canceled
|
|
|
|
######
|
|
### Connection Params Validation Errors
|
|
|
|
ConnectionParamsValidateNullOwnerUri = OwnerUri cannot be null or empty
|
|
|
|
ConnectionParamsValidateNullConnection = Connection details object cannot be null
|
|
|
|
ConnectionParamsValidateNullServerName = ServerName cannot be null or empty
|
|
|
|
ConnectionParamsValidateNullSqlAuth(string component) = {0} cannot be null or empty when using SqlLogin authentication
|
|
|
|
############################################################################
|
|
# Credentials Service
|
|
|
|
CredentialsServiceInvalidCriticalHandle = Invalid CriticalHandle!
|
|
|
|
CredentialsServicePasswordLengthExceeded = The password has exceeded 512 bytes
|
|
|
|
CredentialsServiceTargetForDelete = Target must be specified to delete a credential
|
|
|
|
CredentialsServiceTargetForLookup = Target must be specified to check existance of a credential
|
|
|
|
CredentialServiceWin32CredentialDisposed = Win32Credential object is already disposed
|
|
|
|
############################################################################
|
|
# Hosting
|
|
|
|
HostingUnexpectedEndOfStream = MessageReader's input stream ended unexpectedly, terminating
|
|
|
|
HostingHeaderMissingColon = Message header must separate key and value using ':'
|
|
|
|
HostingHeaderMissingContentLengthHeader = Fatal error: Content-Length header must be provided
|
|
|
|
HostingHeaderMissingContentLengthValue = Fatal error: Content-Length value is not an integer
|
|
|
|
############################################################################
|
|
# Query Execution Service
|
|
|
|
### Cancel Request
|
|
|
|
QueryServiceCancelAlreadyCompleted = The query has already completed, it cannot be cancelled
|
|
|
|
QueryServiceCancelDisposeFailed = Query successfully cancelled, failed to dispose query. Owner URI not found.
|
|
|
|
QueryServiceQueryCancelled = Query was canceled by user
|
|
|
|
### Subset Request
|
|
|
|
QueryServiceSubsetNotCompleted = The query has not completed, yet
|
|
|
|
QueryServiceSubsetBatchOutOfRange = Batch index cannot be less than 0 or greater than the number of batches
|
|
|
|
QueryServiceSubsetResultSetOutOfRange = Result set index cannot be less than 0 or greater than the number of result sets
|
|
|
|
### Data Reader Exceptions
|
|
|
|
QueryServiceDataReaderByteCountInvalid = Maximum number of bytes to return must be greater than zero
|
|
|
|
QueryServiceDataReaderCharCountInvalid = Maximum number of chars to return must be greater than zero
|
|
|
|
QueryServiceDataReaderXmlCountInvalid = Maximum number of XML bytes to return must be greater than zero
|
|
|
|
### File Stream Wrapper Exceptions
|
|
|
|
QueryServiceFileWrapperWriteOnly = Access method cannot be write-only
|
|
|
|
QueryServiceFileWrapperNotInitialized = FileStreamWrapper must be initialized before performing operations
|
|
|
|
QueryServiceFileWrapperReadOnly = This FileStreamWrapper cannot be used for writing
|
|
|
|
### Query Request
|
|
|
|
QueryServiceAffectedRows(long rows) = ({0} row(s) affected)
|
|
|
|
QueryServiceCompletedSuccessfully = Command(s) copleted successfully.
|
|
|
|
QueryServiceErrorFormat(int msg, int lvl, int state, int line, string newLine, string message) = Msg {0}, Level {1}, State {2}, Line {3}{4}{5}
|
|
|
|
QueryServiceQueryFailed(string message) = Query failed: {0}
|
|
|
|
QueryServiceColumnNull = (No column name)
|
|
|
|
QueryServiceRequestsNoQuery = The requested query does not exist
|
|
|
|
QueryServiceQueryInvalidOwnerUri = This editor is not connected to a database
|
|
|
|
QueryServiceQueryInProgress = A query is already in progress for this editor session. Please cancel this query or wait for its completion.
|
|
|
|
QueryServiceMessageSenderNotSql = Sender for OnInfoMessage event must be a SqlConnection
|
|
|
|
QueryServiceResultSetReaderNull = Reader cannot be null
|
|
|
|
### MSC
|
|
|
|
QueryServiceResultSetNotRead = Cannot read subset unless the results have been read from the server
|
|
|
|
QueryServiceResultSetStartRowOutOfRange = Start row cannot be less than 0 or greater than the number of rows in the result set
|
|
|
|
QueryServiceResultSetRowCountOutOfRange = Row count must be a positive integer
|
|
|
|
QueryServiceResultSetNoColumnSchema = Could not retrieve column schema for result set
|
|
|
|
############################################################################
|
|
# Workspace Service
|
|
|
|
WorkspaceServicePositionLineOutOfRange = Position is outside of file line range
|
|
|
|
WorkspaceServicePositionColumnOutOfRange(int line) = Position is outside of column range for line {0}
|
|
|
|
WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol) = Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}) |