diff --git a/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs b/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs index 1b5516de..a24e5d4e 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/EditData/UpdateManagement/CellUpdate.cs @@ -19,6 +19,7 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement private const string NullString = @"NULL"; private const string TextNullString = @"'NULL'"; private static readonly Regex HexRegex = new Regex("0x[0-9A-F]+", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly TimeSpan MaxTimespan = TimeSpan.FromHours(24); /// /// Constructs a new cell update based on the the string value provided and the column @@ -59,8 +60,7 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement } else if (columnType == typeof(TimeSpan)) { - Value = TimeSpan.Parse(valueAsString, CultureInfo.CurrentCulture); - ValueAsString = Value.ToString(); + ProcessTimespanColumn(valueAsString); } else if (columnType == typeof(DateTimeOffset)) { @@ -196,6 +196,18 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.UpdateManagement ValueAsString = Value.ToString(); } + private void ProcessTimespanColumn(string valueAsString) + { + TimeSpan ts = TimeSpan.Parse(valueAsString, CultureInfo.CurrentCulture); + if (ts >= MaxTimespan) + { + throw new InvalidOperationException(SR.EditDataTimeOver24Hrs); + } + + Value = ts; + ValueAsString = Value.ToString(); + } + private void ProcessNullValue() { // Make sure that nulls are allowed if we set it to null diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs index 58b86a8e..f46651da 100755 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs @@ -27,7 +27,7 @@ namespace Microsoft.SqlTools.ServiceLayer Keys.Culture = value; } } - + public static string ConnectionServiceConnectErrorNullParams { @@ -35,7 +35,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ConnectionServiceConnectErrorNullParams); } - } + } public static string ConnectionServiceListDbErrorNullOwnerUri { @@ -43,7 +43,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ConnectionServiceListDbErrorNullOwnerUri); } - } + } public static string ConnectionServiceConnectionCanceled { @@ -51,7 +51,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ConnectionServiceConnectionCanceled); } - } + } public static string ConnectionParamsValidateNullOwnerUri { @@ -59,7 +59,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ConnectionParamsValidateNullOwnerUri); } - } + } public static string ConnectionParamsValidateNullConnection { @@ -67,7 +67,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ConnectionParamsValidateNullConnection); } - } + } public static string ConnectionParamsValidateNullServerName { @@ -75,7 +75,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ConnectionParamsValidateNullServerName); } - } + } public static string ErrorUnexpectedCodeObjectType { @@ -83,7 +83,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ErrorUnexpectedCodeObjectType); } - } + } public static string QueryServiceCancelAlreadyCompleted { @@ -91,7 +91,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceCancelAlreadyCompleted); } - } + } public static string QueryServiceCancelDisposeFailed { @@ -99,7 +99,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceCancelDisposeFailed); } - } + } public static string QueryServiceQueryCancelled { @@ -107,7 +107,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceQueryCancelled); } - } + } public static string QueryServiceSubsetBatchNotCompleted { @@ -115,7 +115,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceSubsetBatchNotCompleted); } - } + } public static string QueryServiceSubsetBatchOutOfRange { @@ -123,7 +123,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceSubsetBatchOutOfRange); } - } + } public static string QueryServiceSubsetResultSetOutOfRange { @@ -131,7 +131,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceSubsetResultSetOutOfRange); } - } + } public static string QueryServiceDataReaderByteCountInvalid { @@ -139,7 +139,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceDataReaderByteCountInvalid); } - } + } public static string QueryServiceDataReaderCharCountInvalid { @@ -147,7 +147,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceDataReaderCharCountInvalid); } - } + } public static string QueryServiceDataReaderXmlCountInvalid { @@ -155,7 +155,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceDataReaderXmlCountInvalid); } - } + } public static string QueryServiceFileWrapperWriteOnly { @@ -163,7 +163,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceFileWrapperWriteOnly); } - } + } public static string QueryServiceFileWrapperNotInitialized { @@ -171,7 +171,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceFileWrapperNotInitialized); } - } + } public static string QueryServiceFileWrapperReadOnly { @@ -179,7 +179,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceFileWrapperReadOnly); } - } + } public static string QueryServiceAffectedOneRow { @@ -187,7 +187,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceAffectedOneRow); } - } + } public static string QueryServiceCompletedSuccessfully { @@ -195,7 +195,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceCompletedSuccessfully); } - } + } public static string QueryServiceColumnNull { @@ -203,7 +203,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceColumnNull); } - } + } public static string QueryServiceRequestsNoQuery { @@ -211,7 +211,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceRequestsNoQuery); } - } + } public static string QueryServiceQueryInvalidOwnerUri { @@ -219,7 +219,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceQueryInvalidOwnerUri); } - } + } public static string QueryServiceQueryInProgress { @@ -227,7 +227,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceQueryInProgress); } - } + } public static string QueryServiceMessageSenderNotSql { @@ -235,7 +235,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceMessageSenderNotSql); } - } + } public static string QueryServiceResultSetAddNoRows { @@ -243,7 +243,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceResultSetAddNoRows); } - } + } public static string QueryServiceSaveAsResultSetNotComplete { @@ -251,7 +251,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceSaveAsResultSetNotComplete); } - } + } public static string QueryServiceSaveAsMiscStartingError { @@ -259,7 +259,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceSaveAsMiscStartingError); } - } + } public static string QueryServiceSaveAsInProgress { @@ -267,7 +267,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceSaveAsInProgress); } - } + } public static string QueryServiceResultSetNotRead { @@ -275,7 +275,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceResultSetNotRead); } - } + } public static string QueryServiceResultSetStartRowOutOfRange { @@ -283,7 +283,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceResultSetStartRowOutOfRange); } - } + } public static string QueryServiceResultSetRowCountOutOfRange { @@ -291,7 +291,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceResultSetRowCountOutOfRange); } - } + } public static string QueryServiceResultSetNoColumnSchema { @@ -299,7 +299,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceResultSetNoColumnSchema); } - } + } public static string QueryServiceExecutionPlanNotFound { @@ -307,7 +307,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.QueryServiceExecutionPlanNotFound); } - } + } public static string PeekDefinitionNoResultsError { @@ -315,7 +315,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.PeekDefinitionNoResultsError); } - } + } public static string PeekDefinitionDatabaseError { @@ -323,7 +323,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.PeekDefinitionDatabaseError); } - } + } public static string PeekDefinitionNotConnectedError { @@ -331,7 +331,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.PeekDefinitionNotConnectedError); } - } + } public static string PeekDefinitionTimedoutError { @@ -339,7 +339,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.PeekDefinitionTimedoutError); } - } + } public static string PeekDefinitionTypeNotSupportedError { @@ -347,7 +347,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.PeekDefinitionTypeNotSupportedError); } - } + } public static string ErrorEmptyStringReplacement { @@ -355,7 +355,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.ErrorEmptyStringReplacement); } - } + } public static string WorkspaceServicePositionLineOutOfRange { @@ -363,7 +363,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.WorkspaceServicePositionLineOutOfRange); } - } + } public static string EditDataSessionNotFound { @@ -371,7 +371,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataSessionNotFound); } - } + } public static string EditDataQueryNotCompleted { @@ -379,7 +379,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataQueryNotCompleted); } - } + } public static string EditDataQueryImproperResultSets { @@ -387,7 +387,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataQueryImproperResultSets); } - } + } public static string EditDataFailedAddRow { @@ -395,7 +395,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataFailedAddRow); } - } + } public static string EditDataRowOutOfRange { @@ -403,7 +403,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataRowOutOfRange); } - } + } public static string EditDataUpdatePending { @@ -411,7 +411,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataUpdatePending); } - } + } public static string EditDataUpdateNotPending { @@ -419,7 +419,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataUpdateNotPending); } - } + } public static string EditDataColumnUpdateNotPending { @@ -427,7 +427,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataColumnUpdateNotPending); } - } + } public static string EditDataObjectMetadataNotFound { @@ -435,7 +435,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataObjectMetadataNotFound); } - } + } public static string EditDataInvalidFormatBinary { @@ -443,7 +443,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataInvalidFormatBinary); } - } + } public static string EditDataInvalidFormatBoolean { @@ -451,7 +451,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataInvalidFormatBoolean); } - } + } public static string EditDataCreateScriptMissingValue { @@ -459,7 +459,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataCreateScriptMissingValue); } - } + } public static string EditDataDeleteSetCell { @@ -467,7 +467,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataDeleteSetCell); } - } + } public static string EditDataColumnIdOutOfRange { @@ -475,7 +475,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataColumnIdOutOfRange); } - } + } public static string EditDataColumnCannotBeEdited { @@ -483,7 +483,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataColumnCannotBeEdited); } - } + } public static string EditDataColumnNoKeyColumns { @@ -491,7 +491,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataColumnNoKeyColumns); } - } + } public static string EditDataScriptFilePathNull { @@ -499,7 +499,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataScriptFilePathNull); } - } + } public static string EditDataCommitInProgress { @@ -507,7 +507,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataCommitInProgress); } - } + } public static string EditDataComputedColumnPlaceholder { @@ -515,7 +515,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataComputedColumnPlaceholder); } - } + } public static string EditDataInitializeInProgress { @@ -523,7 +523,15 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataInitializeInProgress); } - } + } + + public static string EditDataTimeOver24Hrs + { + get + { + return Keys.GetString(Keys.EditDataTimeOver24Hrs); + } + } public static string EditDataNullNotAllowed { @@ -531,7 +539,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EditDataNullNotAllowed); } - } + } public static string EE_BatchSqlMessageNoProcedureInfo { @@ -539,7 +547,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchSqlMessageNoProcedureInfo); } - } + } public static string EE_BatchSqlMessageWithProcedureInfo { @@ -547,7 +555,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchSqlMessageWithProcedureInfo); } - } + } public static string EE_BatchSqlMessageNoLineInfo { @@ -555,7 +563,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchSqlMessageNoLineInfo); } - } + } public static string EE_BatchError_Exception { @@ -563,7 +571,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchError_Exception); } - } + } public static string EE_BatchExecutionInfo_RowsAffected { @@ -571,7 +579,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchExecutionInfo_RowsAffected); } - } + } public static string EE_ExecutionNotYetCompleteError { @@ -579,7 +587,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ExecutionNotYetCompleteError); } - } + } public static string EE_ScriptError_Error { @@ -587,7 +595,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ScriptError_Error); } - } + } public static string EE_ScriptError_ParsingSyntax { @@ -595,7 +603,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ScriptError_ParsingSyntax); } - } + } public static string EE_ScriptError_FatalError { @@ -603,7 +611,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ScriptError_FatalError); } - } + } public static string EE_ExecutionInfo_FinalizingLoop { @@ -611,7 +619,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ExecutionInfo_FinalizingLoop); } - } + } public static string EE_ExecutionInfo_QueryCancelledbyUser { @@ -619,7 +627,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ExecutionInfo_QueryCancelledbyUser); } - } + } public static string EE_BatchExecutionError_Halting { @@ -627,7 +635,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchExecutionError_Halting); } - } + } public static string EE_BatchExecutionError_Ignoring { @@ -635,7 +643,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_BatchExecutionError_Ignoring); } - } + } public static string EE_ExecutionInfo_InitilizingLoop { @@ -643,7 +651,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ExecutionInfo_InitilizingLoop); } - } + } public static string EE_ExecutionError_CommandNotSupported { @@ -651,7 +659,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ExecutionError_CommandNotSupported); } - } + } public static string EE_ExecutionError_VariableNotFound { @@ -659,7 +667,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ExecutionError_VariableNotFound); } - } + } public static string BatchParserWrapperExecutionEngineError { @@ -667,7 +675,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParserWrapperExecutionEngineError); } - } + } public static string BatchParserWrapperExecutionError { @@ -675,7 +683,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParserWrapperExecutionError); } - } + } public static string BatchParserWrapperExecutionEngineBatchMessage { @@ -683,7 +691,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchMessage); } - } + } public static string BatchParserWrapperExecutionEngineBatchResultSetProcessing { @@ -691,7 +699,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetProcessing); } - } + } public static string BatchParserWrapperExecutionEngineBatchResultSetFinished { @@ -699,7 +707,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchResultSetFinished); } - } + } public static string BatchParserWrapperExecutionEngineBatchCancelling { @@ -707,7 +715,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParserWrapperExecutionEngineBatchCancelling); } - } + } public static string EE_ScriptError_Warning { @@ -715,7 +723,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.EE_ScriptError_Warning); } - } + } public static string TroubleshootingAssistanceMessage { @@ -723,7 +731,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.TroubleshootingAssistanceMessage); } - } + } public static string BatchParser_CircularReference { @@ -731,7 +739,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParser_CircularReference); } - } + } public static string BatchParser_CommentNotTerminated { @@ -739,7 +747,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParser_CommentNotTerminated); } - } + } public static string BatchParser_StringNotTerminated { @@ -747,7 +755,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParser_StringNotTerminated); } - } + } public static string BatchParser_IncorrectSyntax { @@ -755,7 +763,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParser_IncorrectSyntax); } - } + } public static string BatchParser_VariableNotDefined { @@ -763,7 +771,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.BatchParser_VariableNotDefined); } - } + } public static string TestLocalizationConstant { @@ -771,7 +779,7 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.TestLocalizationConstant); } - } + } public static string SqlScriptFormatterDecimalMissingPrecision { @@ -779,77 +787,77 @@ namespace Microsoft.SqlTools.ServiceLayer { return Keys.GetString(Keys.SqlScriptFormatterDecimalMissingPrecision); } - } + } public static string ConnectionServiceListDbErrorNotConnected(string uri) { return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri); - } + } public static string ConnectionServiceDbErrorDefaultNotConnected(string uri) { return Keys.GetString(Keys.ConnectionServiceDbErrorDefaultNotConnected, uri); - } + } public static string ConnectionServiceConnStringInvalidAuthType(string authType) { return Keys.GetString(Keys.ConnectionServiceConnStringInvalidAuthType, authType); - } + } public static string ConnectionServiceConnStringInvalidIntent(string intent) { return Keys.GetString(Keys.ConnectionServiceConnStringInvalidIntent, intent); - } + } public static string ConnectionParamsValidateNullSqlAuth(string component) { return Keys.GetString(Keys.ConnectionParamsValidateNullSqlAuth, component); - } + } public static string QueryServiceAffectedRows(long rows) { return Keys.GetString(Keys.QueryServiceAffectedRows, rows); - } + } public static string QueryServiceErrorFormat(int msg, int lvl, int state, int line, string newLine, string message) { return Keys.GetString(Keys.QueryServiceErrorFormat, msg, lvl, state, line, newLine, message); - } + } public static string QueryServiceQueryFailed(string message) { return Keys.GetString(Keys.QueryServiceQueryFailed, message); - } + } public static string QueryServiceSaveAsFail(string fileName, string message) { return Keys.GetString(Keys.QueryServiceSaveAsFail, fileName, message); - } + } public static string PeekDefinitionAzureError(string errorMessage) { return Keys.GetString(Keys.PeekDefinitionAzureError, errorMessage); - } + } public static string PeekDefinitionError(string errorMessage) { return Keys.GetString(Keys.PeekDefinitionError, errorMessage); - } + } public static string WorkspaceServicePositionColumnOutOfRange(int line) { return Keys.GetString(Keys.WorkspaceServicePositionColumnOutOfRange, line); - } + } public static string WorkspaceServiceBufferPositionOutOfOrder(int sLine, int sCol, int eLine, int eCol) { return Keys.GetString(Keys.WorkspaceServiceBufferPositionOutOfOrder, sLine, sCol, eLine, eCol); - } + } public static string EditDataUnsupportedObjectType(string typeName) { return Keys.GetString(Keys.EditDataUnsupportedObjectType, typeName); - } + } [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Keys @@ -857,331 +865,334 @@ namespace Microsoft.SqlTools.ServiceLayer static ResourceManager resourceManager = new ResourceManager("Microsoft.SqlTools.ServiceLayer.Localization.SR", typeof(SR).GetTypeInfo().Assembly); static CultureInfo _culture = null; - - - public const string ConnectionServiceConnectErrorNullParams = "ConnectionServiceConnectErrorNullParams"; - - - public const string ConnectionServiceListDbErrorNullOwnerUri = "ConnectionServiceListDbErrorNullOwnerUri"; - - - public const string ConnectionServiceListDbErrorNotConnected = "ConnectionServiceListDbErrorNotConnected"; - - - public const string ConnectionServiceDbErrorDefaultNotConnected = "ConnectionServiceDbErrorDefaultNotConnected"; - - - public const string ConnectionServiceConnStringInvalidAuthType = "ConnectionServiceConnStringInvalidAuthType"; - - - public const string ConnectionServiceConnStringInvalidIntent = "ConnectionServiceConnStringInvalidIntent"; - - - public const string ConnectionServiceConnectionCanceled = "ConnectionServiceConnectionCanceled"; - - - public const string ConnectionParamsValidateNullOwnerUri = "ConnectionParamsValidateNullOwnerUri"; - - - public const string ConnectionParamsValidateNullConnection = "ConnectionParamsValidateNullConnection"; - - - public const string ConnectionParamsValidateNullServerName = "ConnectionParamsValidateNullServerName"; - - - public const string ConnectionParamsValidateNullSqlAuth = "ConnectionParamsValidateNullSqlAuth"; - - - public const string ErrorUnexpectedCodeObjectType = "ErrorUnexpectedCodeObjectType"; - - - public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted"; - - - public const string QueryServiceCancelDisposeFailed = "QueryServiceCancelDisposeFailed"; - - - public const string QueryServiceQueryCancelled = "QueryServiceQueryCancelled"; - - - public const string QueryServiceSubsetBatchNotCompleted = "QueryServiceSubsetBatchNotCompleted"; - - - public const string QueryServiceSubsetBatchOutOfRange = "QueryServiceSubsetBatchOutOfRange"; - - - public const string QueryServiceSubsetResultSetOutOfRange = "QueryServiceSubsetResultSetOutOfRange"; - - - public const string QueryServiceDataReaderByteCountInvalid = "QueryServiceDataReaderByteCountInvalid"; - - - public const string QueryServiceDataReaderCharCountInvalid = "QueryServiceDataReaderCharCountInvalid"; - - - public const string QueryServiceDataReaderXmlCountInvalid = "QueryServiceDataReaderXmlCountInvalid"; - - - public const string QueryServiceFileWrapperWriteOnly = "QueryServiceFileWrapperWriteOnly"; - - - public const string QueryServiceFileWrapperNotInitialized = "QueryServiceFileWrapperNotInitialized"; - - - public const string QueryServiceFileWrapperReadOnly = "QueryServiceFileWrapperReadOnly"; - - - public const string QueryServiceAffectedOneRow = "QueryServiceAffectedOneRow"; - - - public const string QueryServiceAffectedRows = "QueryServiceAffectedRows"; - - - public const string QueryServiceCompletedSuccessfully = "QueryServiceCompletedSuccessfully"; - - - public const string QueryServiceErrorFormat = "QueryServiceErrorFormat"; - - - public const string QueryServiceQueryFailed = "QueryServiceQueryFailed"; - - - public const string QueryServiceColumnNull = "QueryServiceColumnNull"; - - - public const string QueryServiceRequestsNoQuery = "QueryServiceRequestsNoQuery"; - - - public const string QueryServiceQueryInvalidOwnerUri = "QueryServiceQueryInvalidOwnerUri"; - - - public const string QueryServiceQueryInProgress = "QueryServiceQueryInProgress"; - - - public const string QueryServiceMessageSenderNotSql = "QueryServiceMessageSenderNotSql"; - - - public const string QueryServiceResultSetAddNoRows = "QueryServiceResultSetAddNoRows"; - - - public const string QueryServiceSaveAsResultSetNotComplete = "QueryServiceSaveAsResultSetNotComplete"; - - - public const string QueryServiceSaveAsMiscStartingError = "QueryServiceSaveAsMiscStartingError"; - - - public const string QueryServiceSaveAsInProgress = "QueryServiceSaveAsInProgress"; - - - public const string QueryServiceSaveAsFail = "QueryServiceSaveAsFail"; - - - public const string QueryServiceResultSetNotRead = "QueryServiceResultSetNotRead"; - - - public const string QueryServiceResultSetStartRowOutOfRange = "QueryServiceResultSetStartRowOutOfRange"; - - - public const string QueryServiceResultSetRowCountOutOfRange = "QueryServiceResultSetRowCountOutOfRange"; - - - public const string QueryServiceResultSetNoColumnSchema = "QueryServiceResultSetNoColumnSchema"; - - - public const string QueryServiceExecutionPlanNotFound = "QueryServiceExecutionPlanNotFound"; - - - public const string PeekDefinitionAzureError = "PeekDefinitionAzureError"; - - - public const string PeekDefinitionError = "PeekDefinitionError"; - - - public const string PeekDefinitionNoResultsError = "PeekDefinitionNoResultsError"; - - - public const string PeekDefinitionDatabaseError = "PeekDefinitionDatabaseError"; - - - public const string PeekDefinitionNotConnectedError = "PeekDefinitionNotConnectedError"; - - - public const string PeekDefinitionTimedoutError = "PeekDefinitionTimedoutError"; - - - public const string PeekDefinitionTypeNotSupportedError = "PeekDefinitionTypeNotSupportedError"; - - - public const string ErrorEmptyStringReplacement = "ErrorEmptyStringReplacement"; - - - public const string WorkspaceServicePositionLineOutOfRange = "WorkspaceServicePositionLineOutOfRange"; - - - public const string WorkspaceServicePositionColumnOutOfRange = "WorkspaceServicePositionColumnOutOfRange"; - - - public const string WorkspaceServiceBufferPositionOutOfOrder = "WorkspaceServiceBufferPositionOutOfOrder"; - - - public const string EditDataSessionNotFound = "EditDataSessionNotFound"; - - - public const string EditDataUnsupportedObjectType = "EditDataUnsupportedObjectType"; - - - public const string EditDataQueryNotCompleted = "EditDataQueryNotCompleted"; - - - public const string EditDataQueryImproperResultSets = "EditDataQueryImproperResultSets"; - - - public const string EditDataFailedAddRow = "EditDataFailedAddRow"; - - - public const string EditDataRowOutOfRange = "EditDataRowOutOfRange"; - - - public const string EditDataUpdatePending = "EditDataUpdatePending"; - - - public const string EditDataUpdateNotPending = "EditDataUpdateNotPending"; - - - public const string EditDataColumnUpdateNotPending = "EditDataColumnUpdateNotPending"; - - - public const string EditDataObjectMetadataNotFound = "EditDataObjectMetadataNotFound"; - - - public const string EditDataInvalidFormatBinary = "EditDataInvalidFormatBinary"; - - - public const string EditDataInvalidFormatBoolean = "EditDataInvalidFormatBoolean"; - - - public const string EditDataCreateScriptMissingValue = "EditDataCreateScriptMissingValue"; - - - public const string EditDataDeleteSetCell = "EditDataDeleteSetCell"; - - - public const string EditDataColumnIdOutOfRange = "EditDataColumnIdOutOfRange"; - - - public const string EditDataColumnCannotBeEdited = "EditDataColumnCannotBeEdited"; - - - public const string EditDataColumnNoKeyColumns = "EditDataColumnNoKeyColumns"; - - - public const string EditDataScriptFilePathNull = "EditDataScriptFilePathNull"; - - - public const string EditDataCommitInProgress = "EditDataCommitInProgress"; - - - public const string EditDataComputedColumnPlaceholder = "EditDataComputedColumnPlaceholder"; - - - public const string EditDataInitializeInProgress = "EditDataInitializeInProgress"; - - - public const string EditDataNullNotAllowed = "EditDataNullNotAllowed"; - - - public const string EE_BatchSqlMessageNoProcedureInfo = "EE_BatchSqlMessageNoProcedureInfo"; - - - public const string EE_BatchSqlMessageWithProcedureInfo = "EE_BatchSqlMessageWithProcedureInfo"; - - - public const string EE_BatchSqlMessageNoLineInfo = "EE_BatchSqlMessageNoLineInfo"; - - - public const string EE_BatchError_Exception = "EE_BatchError_Exception"; - - - public const string EE_BatchExecutionInfo_RowsAffected = "EE_BatchExecutionInfo_RowsAffected"; - - - public const string EE_ExecutionNotYetCompleteError = "EE_ExecutionNotYetCompleteError"; - - - public const string EE_ScriptError_Error = "EE_ScriptError_Error"; - - - public const string EE_ScriptError_ParsingSyntax = "EE_ScriptError_ParsingSyntax"; - - - public const string EE_ScriptError_FatalError = "EE_ScriptError_FatalError"; - - - public const string EE_ExecutionInfo_FinalizingLoop = "EE_ExecutionInfo_FinalizingLoop"; - - - public const string EE_ExecutionInfo_QueryCancelledbyUser = "EE_ExecutionInfo_QueryCancelledbyUser"; - - - public const string EE_BatchExecutionError_Halting = "EE_BatchExecutionError_Halting"; - - - public const string EE_BatchExecutionError_Ignoring = "EE_BatchExecutionError_Ignoring"; - - - public const string EE_ExecutionInfo_InitilizingLoop = "EE_ExecutionInfo_InitilizingLoop"; - - - public const string EE_ExecutionError_CommandNotSupported = "EE_ExecutionError_CommandNotSupported"; - - - public const string EE_ExecutionError_VariableNotFound = "EE_ExecutionError_VariableNotFound"; - - - public const string BatchParserWrapperExecutionEngineError = "BatchParserWrapperExecutionEngineError"; - - - public const string BatchParserWrapperExecutionError = "BatchParserWrapperExecutionError"; - - - public const string BatchParserWrapperExecutionEngineBatchMessage = "BatchParserWrapperExecutionEngineBatchMessage"; - - - public const string BatchParserWrapperExecutionEngineBatchResultSetProcessing = "BatchParserWrapperExecutionEngineBatchResultSetProcessing"; - - - public const string BatchParserWrapperExecutionEngineBatchResultSetFinished = "BatchParserWrapperExecutionEngineBatchResultSetFinished"; - - - public const string BatchParserWrapperExecutionEngineBatchCancelling = "BatchParserWrapperExecutionEngineBatchCancelling"; - - - public const string EE_ScriptError_Warning = "EE_ScriptError_Warning"; - - - public const string TroubleshootingAssistanceMessage = "TroubleshootingAssistanceMessage"; - - - public const string BatchParser_CircularReference = "BatchParser_CircularReference"; - - - public const string BatchParser_CommentNotTerminated = "BatchParser_CommentNotTerminated"; - - - public const string BatchParser_StringNotTerminated = "BatchParser_StringNotTerminated"; - - - public const string BatchParser_IncorrectSyntax = "BatchParser_IncorrectSyntax"; - - - public const string BatchParser_VariableNotDefined = "BatchParser_VariableNotDefined"; - - - public const string TestLocalizationConstant = "TestLocalizationConstant"; - - - public const string SqlScriptFormatterDecimalMissingPrecision = "SqlScriptFormatterDecimalMissingPrecision"; - + + + public const string ConnectionServiceConnectErrorNullParams = "ConnectionServiceConnectErrorNullParams"; + + + public const string ConnectionServiceListDbErrorNullOwnerUri = "ConnectionServiceListDbErrorNullOwnerUri"; + + + public const string ConnectionServiceListDbErrorNotConnected = "ConnectionServiceListDbErrorNotConnected"; + + + public const string ConnectionServiceDbErrorDefaultNotConnected = "ConnectionServiceDbErrorDefaultNotConnected"; + + + public const string ConnectionServiceConnStringInvalidAuthType = "ConnectionServiceConnStringInvalidAuthType"; + + + public const string ConnectionServiceConnStringInvalidIntent = "ConnectionServiceConnStringInvalidIntent"; + + + public const string ConnectionServiceConnectionCanceled = "ConnectionServiceConnectionCanceled"; + + + public const string ConnectionParamsValidateNullOwnerUri = "ConnectionParamsValidateNullOwnerUri"; + + + public const string ConnectionParamsValidateNullConnection = "ConnectionParamsValidateNullConnection"; + + + public const string ConnectionParamsValidateNullServerName = "ConnectionParamsValidateNullServerName"; + + + public const string ConnectionParamsValidateNullSqlAuth = "ConnectionParamsValidateNullSqlAuth"; + + + public const string ErrorUnexpectedCodeObjectType = "ErrorUnexpectedCodeObjectType"; + + + public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted"; + + + public const string QueryServiceCancelDisposeFailed = "QueryServiceCancelDisposeFailed"; + + + public const string QueryServiceQueryCancelled = "QueryServiceQueryCancelled"; + + + public const string QueryServiceSubsetBatchNotCompleted = "QueryServiceSubsetBatchNotCompleted"; + + + public const string QueryServiceSubsetBatchOutOfRange = "QueryServiceSubsetBatchOutOfRange"; + + + public const string QueryServiceSubsetResultSetOutOfRange = "QueryServiceSubsetResultSetOutOfRange"; + + + public const string QueryServiceDataReaderByteCountInvalid = "QueryServiceDataReaderByteCountInvalid"; + + + public const string QueryServiceDataReaderCharCountInvalid = "QueryServiceDataReaderCharCountInvalid"; + + + public const string QueryServiceDataReaderXmlCountInvalid = "QueryServiceDataReaderXmlCountInvalid"; + + + public const string QueryServiceFileWrapperWriteOnly = "QueryServiceFileWrapperWriteOnly"; + + + public const string QueryServiceFileWrapperNotInitialized = "QueryServiceFileWrapperNotInitialized"; + + + public const string QueryServiceFileWrapperReadOnly = "QueryServiceFileWrapperReadOnly"; + + + public const string QueryServiceAffectedOneRow = "QueryServiceAffectedOneRow"; + + + public const string QueryServiceAffectedRows = "QueryServiceAffectedRows"; + + + public const string QueryServiceCompletedSuccessfully = "QueryServiceCompletedSuccessfully"; + + + public const string QueryServiceErrorFormat = "QueryServiceErrorFormat"; + + + public const string QueryServiceQueryFailed = "QueryServiceQueryFailed"; + + + public const string QueryServiceColumnNull = "QueryServiceColumnNull"; + + + public const string QueryServiceRequestsNoQuery = "QueryServiceRequestsNoQuery"; + + + public const string QueryServiceQueryInvalidOwnerUri = "QueryServiceQueryInvalidOwnerUri"; + + + public const string QueryServiceQueryInProgress = "QueryServiceQueryInProgress"; + + + public const string QueryServiceMessageSenderNotSql = "QueryServiceMessageSenderNotSql"; + + + public const string QueryServiceResultSetAddNoRows = "QueryServiceResultSetAddNoRows"; + + + public const string QueryServiceSaveAsResultSetNotComplete = "QueryServiceSaveAsResultSetNotComplete"; + + + public const string QueryServiceSaveAsMiscStartingError = "QueryServiceSaveAsMiscStartingError"; + + + public const string QueryServiceSaveAsInProgress = "QueryServiceSaveAsInProgress"; + + + public const string QueryServiceSaveAsFail = "QueryServiceSaveAsFail"; + + + public const string QueryServiceResultSetNotRead = "QueryServiceResultSetNotRead"; + + + public const string QueryServiceResultSetStartRowOutOfRange = "QueryServiceResultSetStartRowOutOfRange"; + + + public const string QueryServiceResultSetRowCountOutOfRange = "QueryServiceResultSetRowCountOutOfRange"; + + + public const string QueryServiceResultSetNoColumnSchema = "QueryServiceResultSetNoColumnSchema"; + + + public const string QueryServiceExecutionPlanNotFound = "QueryServiceExecutionPlanNotFound"; + + + public const string PeekDefinitionAzureError = "PeekDefinitionAzureError"; + + + public const string PeekDefinitionError = "PeekDefinitionError"; + + + public const string PeekDefinitionNoResultsError = "PeekDefinitionNoResultsError"; + + + public const string PeekDefinitionDatabaseError = "PeekDefinitionDatabaseError"; + + + public const string PeekDefinitionNotConnectedError = "PeekDefinitionNotConnectedError"; + + + public const string PeekDefinitionTimedoutError = "PeekDefinitionTimedoutError"; + + + public const string PeekDefinitionTypeNotSupportedError = "PeekDefinitionTypeNotSupportedError"; + + + public const string ErrorEmptyStringReplacement = "ErrorEmptyStringReplacement"; + + + public const string WorkspaceServicePositionLineOutOfRange = "WorkspaceServicePositionLineOutOfRange"; + + + public const string WorkspaceServicePositionColumnOutOfRange = "WorkspaceServicePositionColumnOutOfRange"; + + + public const string WorkspaceServiceBufferPositionOutOfOrder = "WorkspaceServiceBufferPositionOutOfOrder"; + + + public const string EditDataSessionNotFound = "EditDataSessionNotFound"; + + + public const string EditDataUnsupportedObjectType = "EditDataUnsupportedObjectType"; + + + public const string EditDataQueryNotCompleted = "EditDataQueryNotCompleted"; + + + public const string EditDataQueryImproperResultSets = "EditDataQueryImproperResultSets"; + + + public const string EditDataFailedAddRow = "EditDataFailedAddRow"; + + + public const string EditDataRowOutOfRange = "EditDataRowOutOfRange"; + + + public const string EditDataUpdatePending = "EditDataUpdatePending"; + + + public const string EditDataUpdateNotPending = "EditDataUpdateNotPending"; + + + public const string EditDataColumnUpdateNotPending = "EditDataColumnUpdateNotPending"; + + + public const string EditDataObjectMetadataNotFound = "EditDataObjectMetadataNotFound"; + + + public const string EditDataInvalidFormatBinary = "EditDataInvalidFormatBinary"; + + + public const string EditDataInvalidFormatBoolean = "EditDataInvalidFormatBoolean"; + + + public const string EditDataCreateScriptMissingValue = "EditDataCreateScriptMissingValue"; + + + public const string EditDataDeleteSetCell = "EditDataDeleteSetCell"; + + + public const string EditDataColumnIdOutOfRange = "EditDataColumnIdOutOfRange"; + + + public const string EditDataColumnCannotBeEdited = "EditDataColumnCannotBeEdited"; + + + public const string EditDataColumnNoKeyColumns = "EditDataColumnNoKeyColumns"; + + + public const string EditDataScriptFilePathNull = "EditDataScriptFilePathNull"; + + + public const string EditDataCommitInProgress = "EditDataCommitInProgress"; + + + public const string EditDataComputedColumnPlaceholder = "EditDataComputedColumnPlaceholder"; + + + public const string EditDataInitializeInProgress = "EditDataInitializeInProgress"; + + + public const string EditDataTimeOver24Hrs = "EditDataTimeOver24Hrs"; + + + public const string EditDataNullNotAllowed = "EditDataNullNotAllowed"; + + + public const string EE_BatchSqlMessageNoProcedureInfo = "EE_BatchSqlMessageNoProcedureInfo"; + + + public const string EE_BatchSqlMessageWithProcedureInfo = "EE_BatchSqlMessageWithProcedureInfo"; + + + public const string EE_BatchSqlMessageNoLineInfo = "EE_BatchSqlMessageNoLineInfo"; + + + public const string EE_BatchError_Exception = "EE_BatchError_Exception"; + + + public const string EE_BatchExecutionInfo_RowsAffected = "EE_BatchExecutionInfo_RowsAffected"; + + + public const string EE_ExecutionNotYetCompleteError = "EE_ExecutionNotYetCompleteError"; + + + public const string EE_ScriptError_Error = "EE_ScriptError_Error"; + + + public const string EE_ScriptError_ParsingSyntax = "EE_ScriptError_ParsingSyntax"; + + + public const string EE_ScriptError_FatalError = "EE_ScriptError_FatalError"; + + + public const string EE_ExecutionInfo_FinalizingLoop = "EE_ExecutionInfo_FinalizingLoop"; + + + public const string EE_ExecutionInfo_QueryCancelledbyUser = "EE_ExecutionInfo_QueryCancelledbyUser"; + + + public const string EE_BatchExecutionError_Halting = "EE_BatchExecutionError_Halting"; + + + public const string EE_BatchExecutionError_Ignoring = "EE_BatchExecutionError_Ignoring"; + + + public const string EE_ExecutionInfo_InitilizingLoop = "EE_ExecutionInfo_InitilizingLoop"; + + + public const string EE_ExecutionError_CommandNotSupported = "EE_ExecutionError_CommandNotSupported"; + + + public const string EE_ExecutionError_VariableNotFound = "EE_ExecutionError_VariableNotFound"; + + + public const string BatchParserWrapperExecutionEngineError = "BatchParserWrapperExecutionEngineError"; + + + public const string BatchParserWrapperExecutionError = "BatchParserWrapperExecutionError"; + + + public const string BatchParserWrapperExecutionEngineBatchMessage = "BatchParserWrapperExecutionEngineBatchMessage"; + + + public const string BatchParserWrapperExecutionEngineBatchResultSetProcessing = "BatchParserWrapperExecutionEngineBatchResultSetProcessing"; + + + public const string BatchParserWrapperExecutionEngineBatchResultSetFinished = "BatchParserWrapperExecutionEngineBatchResultSetFinished"; + + + public const string BatchParserWrapperExecutionEngineBatchCancelling = "BatchParserWrapperExecutionEngineBatchCancelling"; + + + public const string EE_ScriptError_Warning = "EE_ScriptError_Warning"; + + + public const string TroubleshootingAssistanceMessage = "TroubleshootingAssistanceMessage"; + + + public const string BatchParser_CircularReference = "BatchParser_CircularReference"; + + + public const string BatchParser_CommentNotTerminated = "BatchParser_CommentNotTerminated"; + + + public const string BatchParser_StringNotTerminated = "BatchParser_StringNotTerminated"; + + + public const string BatchParser_IncorrectSyntax = "BatchParser_IncorrectSyntax"; + + + public const string BatchParser_VariableNotDefined = "BatchParser_VariableNotDefined"; + + + public const string TestLocalizationConstant = "TestLocalizationConstant"; + + + public const string SqlScriptFormatterDecimalMissingPrecision = "SqlScriptFormatterDecimalMissingPrecision"; + private Keys() { } @@ -1202,31 +1213,31 @@ namespace Microsoft.SqlTools.ServiceLayer { return resourceManager.GetString(key, _culture); } - + public static string GetString(string key, object arg0) { return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0); } - + public static string GetString(string key, object arg0, object arg1) { return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1); } - + public static string GetString(string key, object arg0, object arg1, object arg2, object arg3) { return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3); } - + public static string GetString(string key, object arg0, object arg1, object arg2, object arg3, object arg4, object arg5) { return string.Format(global::System.Globalization.CultureInfo.CurrentCulture, resourceManager.GetString(key, _culture), arg0, arg1, arg2, arg3, arg4, arg5); } - - } - } -} + + } + } +} diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx index 04bafe16..6def9f61 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.es.resx @@ -1,426 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Los parámetros de conexión no pueden ser nulos - - - OwnerUri no puede ser nulo ni estar vacío - - - SpecifiedUri '{0}' no tiene una conexión existente - - - El valor '{0}' no es válido para AuthenticationType. Los valores válidos son 'Integrated' y 'SqlLogin'. - - - El valor '{0}' no es válido para ApplicationIntent. Los valores válidos son 'ReadWrite' y 'ReadOnly'. - - - Conexión cancelada - - - OwnerUri no puede ser nulo ni estar vacío - - - El objeto de detalles de conexión no puede ser nulo - - - ServerName no puede ser nulo ni estar vacío - - - {0} no puede ser nulo ni estar vacío cuando se utiliza autenticación SqlLogin - - - Ya se ha completado la consulta, no se puede cancelar - - - La consulta fue cancelada con éxito, pero no se ha podido desechar. No se encontró el URI del propietario. - - - Consulta cancelada por el usuario - - - El lote aún no ha finalizado, - - - Índice de lote no puede ser menor que 0 o mayor que el número de lotes - - - Índice del conjunto de resultados no puede ser menor que 0 o mayor que el número de conjuntos de resultados - - - El número máximo de bytes a devolver debe ser mayor que cero - - - El número máximo de caracteres a devolver debe ser mayor que cero - - - El número máximo de bytes XML a devolver debe ser mayor que cero - - - El método de acceso no puede ser de sólo escritura - - - FileStreamWrapper debe inicializarse antes de realizar operaciones - - - Este FileStreamWrapper no se puede utilizar para escritura. - - - (1 fila afectada) - - - ({0} filas afectadas) - - - Comandos finalizados correctamente. - - - Msg {0}, nivel {1} estado {2}, línea {3} {4} {5} - - - Error en la consulta: {0} - - - (Ningún nombre de columna) - - - La consulta solicitada no existe - - - Este editor no está conectado a una base de datos - - - Una consulta ya está en curso para esta sesión de editor. Por favor, cancelar esta consulta o esperar su finalización. - - - Remitente de eventos de OnInfoMessage debe ser un objeto SqlConnection - - - Lector no puede ser nulo - - - No se puede guardar el resultado hasta que haya finalizado la ejecución de la consulta - - - Error interno al iniciar el guardado de la tarea - - - Una operacion de guardado en la misma ruta se encuentra en curso - - - Error al guardar {0}: {1} - - - No se puede leer el subconjunto, a menos que los resultados se han leído desde el servidor - - - Fila de inicio no puede ser menor que 0 o mayor que el número de filas en el conjunto de resultados - - - La cantidad de filas debe ser un entero positivo - - - No se pudo recuperar el esquema de columna para el conjunto de resultados - - - No se pudo recuperar un plan de ejecución del conjunto de resultados - - - Esta característica actualmente no se admite en la base de datos de SQL Azure y almacén de datos: {0} - - - Se ha producido un error inesperado durante la ejecución de la definición de Peek: {0} - - - No se encontraron resultados. - - - No se pudo obtener ningún objeto asociado a la base de datos. - - - Conéctese a un servidor. - - - Tiempo de espera agotado para esta operación. - - - Esta característica no admite actualmente este tipo de objeto. - - - Posición está fuera del intervalo de la línea de archivo - - - Posición está fuera del intervalo de la columna de la línea {0} - - - Posición de inicio ({0}, {1}) debe preceder o ser igual a la posición final ({2}, {3}) - - - Msg {0}, {1}, nivel de estado {2}, línea {3} - - - Msj {0}, {1}, nivel de estado {2}, procedimiento {3}, línea {4} - - - Msg {0}, nivel {1}, {2} de estado - - - Se produjo un error al procesar el lote. Mensaje de error: {0} - - - ({0} filas afectadas) - - - La ejecución anterior aún no está completa. - - - Se ha producido un error de secuencias de comandos. - - - Se encontró sintaxis incorrecta mientras se estaba analizando {0}. - - - Se ha producido un error grave. - - - La ejecución completó {0} veces... - - - Se canceló la consulta. - - - Se produjo un error mientras se ejecutaba el lote. - - - Se produjo un error mientras se ejecutaba el lote, pero se ha omitido el error. - - - Iniciando bucle de ejecución de {0} veces... - - - No se admite el comando {0}. - - - La variable {0} no se encontró. - - - Error de ejecución de SQL: {0} - - - Ejecución de contenedor del analizador por lotes: {0} se encuentra... en la línea {1}: {2} Descripción: {3} - - - Lote analizador contenedor ejecución motor lote mensaje recibido: mensaje: {0} mensaje detallado: {1} - - - Motor de ejecución de analizador contenedor lote ResultSet procesamiento por lotes: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} - - - Finalizó el elemento ResultSet analizador contenedor ejecución motor los lotes. - - - Cancelando la ejecución por lotes del contenedor del analizador por lotes. - - - Advertencia de scripting. - - - Para obtener más información acerca de este error, vea los temas de solución de problemas en la documentación del producto. - - - El archivo '{0}' se incluyó recursivamente. - - - Falta la marca de final de comentario ' * /'. - - - Sin comilla de cierre después de la cadena de caracteres. - - - Se encontró sintaxis incorrecta al analizar '{0}'. - - - La variable {0} no está definida. - - - prueba - - - No se puede convertir el SqlCodeObject del Tipo {0} al Tipo {1} - - - Sustitución de una cadena vacía por una cadena vacía. - - - Sesión de edición no existe, - - - La consulta no ha finalizado. - - - La consulta no generó un único set de resultados - - - Falló al agregar una nueva fila a la caché de actualización - - - El ID de la fila ingresado, se encuentra fuera del rango de filas de la caché de edición - - - Una actualización está pendiente para esta fila y debe de revertirse primero - - - El ID de la fila ingresado no tiene actualizaciones pendientes - - - La metadata de la tabla o vista no pudo ser encontrada - - - Formato inválido para columna binaria - - - Columnas del tipo boolean deben de ser numéricos 1 o 0, o tipo string true o false - - - Falta un valor requerido de la celda - - - Existe una eliminación pendiente para esta fila, una actualización de celda no puede ser realizada. - - - El ID de la columna debe de estar en el rango de columnas de la consulta. - - - La columna no puede ser editada - - - No se encontró ninguna columna clave - - - Proporcione un nombre de archivo de salida - - - Objeto de base de datos {0} no puede ser usado para modificación. - - - SpecifiedUri '{0}' no tiene alguna conexión por defecto - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Los parámetros de conexión no pueden ser nulos + OwnerUri no puede ser nulo ni estar vacío + SpecifiedUri '{0}' no tiene una conexión existente + El valor '{0}' no es válido para AuthenticationType. Los valores válidos son 'Integrated' y 'SqlLogin'. + El valor '{0}' no es válido para ApplicationIntent. Los valores válidos son 'ReadWrite' y 'ReadOnly'. + Conexión cancelada + OwnerUri no puede ser nulo ni estar vacío + El objeto de detalles de conexión no puede ser nulo + ServerName no puede ser nulo ni estar vacío + {0} no puede ser nulo ni estar vacío cuando se utiliza autenticación SqlLogin + Ya se ha completado la consulta, no se puede cancelar + La consulta fue cancelada con éxito, pero no se ha podido desechar. No se encontró el URI del propietario. + Consulta cancelada por el usuario + El lote aún no ha finalizado, + Índice de lote no puede ser menor que 0 o mayor que el número de lotes + Índice del conjunto de resultados no puede ser menor que 0 o mayor que el número de conjuntos de resultados + El número máximo de bytes a devolver debe ser mayor que cero + El número máximo de caracteres a devolver debe ser mayor que cero + El número máximo de bytes XML a devolver debe ser mayor que cero + El método de acceso no puede ser de sólo escritura + FileStreamWrapper debe inicializarse antes de realizar operaciones + Este FileStreamWrapper no se puede utilizar para escritura. + (1 fila afectada) + ({0} filas afectadas) + Comandos finalizados correctamente. + Msg {0}, nivel {1} estado {2}, línea {3} {4} {5} + Error en la consulta: {0} + (Ningún nombre de columna) + La consulta solicitada no existe + Este editor no está conectado a una base de datos + Una consulta ya está en curso para esta sesión de editor. Por favor, cancelar esta consulta o esperar su finalización. + Remitente de eventos de OnInfoMessage debe ser un objeto SqlConnection + Lector no puede ser nulo + No se puede guardar el resultado hasta que haya finalizado la ejecución de la consulta + Error interno al iniciar el guardado de la tarea + Una operacion de guardado en la misma ruta se encuentra en curso + Error al guardar {0}: {1} + No se puede leer el subconjunto, a menos que los resultados se han leído desde el servidor + Fila de inicio no puede ser menor que 0 o mayor que el número de filas en el conjunto de resultados + La cantidad de filas debe ser un entero positivo + No se pudo recuperar el esquema de columna para el conjunto de resultados + No se pudo recuperar un plan de ejecución del conjunto de resultados + Esta característica actualmente no se admite en la base de datos de SQL Azure y almacén de datos: {0} + Se ha producido un error inesperado durante la ejecución de la definición de Peek: {0} + No se encontraron resultados. + No se pudo obtener ningún objeto asociado a la base de datos. + Conéctese a un servidor. + Tiempo de espera agotado para esta operación. + Esta característica no admite actualmente este tipo de objeto. + Posición está fuera del intervalo de la línea de archivo + Posición está fuera del intervalo de la columna de la línea {0} + Posición de inicio ({0}, {1}) debe preceder o ser igual a la posición final ({2}, {3}) + Msg {0}, {1}, nivel de estado {2}, línea {3} + Msj {0}, {1}, nivel de estado {2}, procedimiento {3}, línea {4} + Msg {0}, nivel {1}, {2} de estado + Se produjo un error al procesar el lote. Mensaje de error: {0} + ({0} filas afectadas) + La ejecución anterior aún no está completa. + Se ha producido un error de secuencias de comandos. + Se encontró sintaxis incorrecta mientras se estaba analizando {0}. + Se ha producido un error grave. + La ejecución completó {0} veces... + Se canceló la consulta. + Se produjo un error mientras se ejecutaba el lote. + Se produjo un error mientras se ejecutaba el lote, pero se ha omitido el error. + Iniciando bucle de ejecución de {0} veces... + No se admite el comando {0}. + La variable {0} no se encontró. + Error de ejecución de SQL: {0} + Ejecución de contenedor del analizador por lotes: {0} se encuentra... en la línea {1}: {2} Descripción: {3} + Lote analizador contenedor ejecución motor lote mensaje recibido: mensaje: {0} mensaje detallado: {1} + Motor de ejecución de analizador contenedor lote ResultSet procesamiento por lotes: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} + Finalizó el elemento ResultSet analizador contenedor ejecución motor los lotes. + Cancelando la ejecución por lotes del contenedor del analizador por lotes. + Advertencia de scripting. + Para obtener más información acerca de este error, vea los temas de solución de problemas en la documentación del producto. + El archivo '{0}' se incluyó recursivamente. + Falta la marca de final de comentario ' * /'. + Sin comilla de cierre después de la cadena de caracteres. + Se encontró sintaxis incorrecta al analizar '{0}'. + La variable {0} no está definida. + prueba + No se puede convertir el SqlCodeObject del Tipo {0} al Tipo {1} + Sustitución de una cadena vacía por una cadena vacía. + Sesión de edición no existe, + La consulta no ha finalizado. + La consulta no generó un único set de resultados + Falló al agregar una nueva fila a la caché de actualización + El ID de la fila ingresado, se encuentra fuera del rango de filas de la caché de edición + Una actualización está pendiente para esta fila y debe de revertirse primero + El ID de la fila ingresado no tiene actualizaciones pendientes + La metadata de la tabla o vista no pudo ser encontrada + Formato inválido para columna binaria + Columnas del tipo boolean deben de ser numéricos 1 o 0, o tipo string true o false + Falta un valor requerido de la celda + Existe una eliminación pendiente para esta fila, una actualización de celda no puede ser realizada. + El ID de la columna debe de estar en el rango de columnas de la consulta. + La columna no puede ser editada + No se encontró ninguna columna clave + Proporcione un nombre de archivo de salida + Objeto de base de datos {0} no puede ser usado para modificación. + SpecifiedUri '{0}' no tiene alguna conexión por defecto + \ No newline at end of file diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx index ecc3b2c3..fa5320ad 100755 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx @@ -120,447 +120,451 @@ Connection parameters cannot be null - + OwnerUri cannot be null or empty - + SpecifiedUri '{0}' does not have existing connection . Parameters: 0 - uri (string) - + Specified URI '{0}' does not have a default connection . Parameters: 0 - uri (string) - + Invalid value '{0}' for AuthenticationType. Valid values are 'Integrated' and 'SqlLogin'. . Parameters: 0 - authType (string) - + Invalid value '{0}' for ApplicationIntent. Valid values are 'ReadWrite' and 'ReadOnly'. . Parameters: 0 - intent (string) - + Connection canceled - + OwnerUri cannot be null or empty - + Connection details object cannot be null - + ServerName cannot be null or empty - + {0} cannot be null or empty when using SqlLogin authentication . Parameters: 0 - component (string) - + Cannot convert SqlCodeObject Type {0} to Type {1} - + The query has already completed, it cannot be cancelled - + Query successfully cancelled, failed to dispose query. Owner URI not found. - + Query was canceled by user - + The batch has not completed, yet - + Batch index cannot be less than 0 or greater than the number of batches - + Result set index cannot be less than 0 or greater than the number of result sets - + Maximum number of bytes to return must be greater than zero - + Maximum number of chars to return must be greater than zero - + Maximum number of XML bytes to return must be greater than zero - + Access method cannot be write-only - + FileStreamWrapper must be initialized before performing operations - + This FileStreamWrapper cannot be used for writing - + (1 row affected) - + ({0} rows affected) . Parameters: 0 - rows (long) - + Commands completed successfully. - + Msg {0}, Level {1}, State {2}, Line {3}{4}{5} . Parameters: 0 - msg (int), 1 - lvl (int), 2 - state (int), 3 - line (int), 4 - newLine (string), 5 - message (string) - + Query failed: {0} . Parameters: 0 - message (string) - + (No column name) - + The requested query does not exist - + This editor is not connected to a database - + A query is already in progress for this editor session. Please cancel this query or wait for its completion. - + Sender for OnInfoMessage event must be a SqlConnection - + Cannot add row to result buffer, data reader does not contain rows - + Result cannot be saved until query execution has completed - + Internal error occurred while starting save task - + A save request to the same path is in progress - + Failed to save {0}: {1} . Parameters: 0 - fileName (string), 1 - message (string) - + Cannot read subset unless the results have been read from the server - + Start row cannot be less than 0 or greater than the number of rows in the result set - + Row count must be a positive integer - + Could not retrieve column schema for result set - + Could not retrieve an execution plan from the result set - + This feature is currently not supported on Azure SQL DB and Data Warehouse: {0} . Parameters: 0 - errorMessage (string) - + An unexpected error occurred during Peek Definition execution: {0} . Parameters: 0 - errorMessage (string) - + No results were found. - + No database object was retrieved. - + Please connect to a server. - + Operation timed out. - + This object type is currently not supported by this feature. - + Replacement of an empty string by an empty string. - + Position is outside of file line range - + Position is outside of column range for line {0} . Parameters: 0 - line (int) - + Start position ({0}, {1}) must come before or be equal to the end position ({2}, {3}) . Parameters: 0 - sLine (int), 1 - sCol (int), 2 - eLine (int), 3 - eCol (int) - + Edit session does not exist. - + Database object {0} cannot be used for editing. . Parameters: 0 - typeName (string) - + Query has not completed execution - + Query did not generate exactly one result set - + Failed to add new row to update cache - + Given row ID is outside the range of rows in the edit cache - + An update is already pending for this row and must be reverted first - + Given row ID does not have pending update - + Give column ID does not have pending update - + Table or view metadata could not be found - + Invalid format for binary column - + Allowed values for boolean columns are 0, 1, "true", or "false" - + A required cell value is missing - + A delete is pending for this row, a cell update cannot be applied. - + Column ID must be in the range of columns for the query - + Column cannot be edited - + No key columns were found - + An output filename must be provided - + A commit task is in progress. Please wait for completion. - + <TBD> - + Another edit data initialize is in progress for this owner URI. Please wait for completion. - + + + TIME column values must be between 00:00:00.0000000 and 23:59:59.9999999 + + NULL is not allowed for this column - + Msg {0}, Level {1}, State {2}, Line {3} - + Msg {0}, Level {1}, State {2}, Procedure {3}, Line {4} - + Msg {0}, Level {1}, State {2} - + An error occurred while the batch was being processed. The error message is: {0} - + ({0} row(s) affected) - + The previous execution is not yet complete. - + A scripting error occurred. - + Incorrect syntax was encountered while {0} was being parsed. - + A fatal error occurred. - + Execution completed {0} times... - + You cancelled the query. - + An error occurred while the batch was being executed. - + An error occurred while the batch was being executed, but the error has been ignored. - + Starting execution loop of {0} times... - + Command {0} is not supported. - + The variable {0} could not be found. - + SQL Execution error: {0} - + Batch parser wrapper execution: {0} found... at line {1}: {2} Description: {3} - + Batch parser wrapper execution engine batch message received: Message: {0} Detailed message: {1} - + Batch parser wrapper execution engine batch ResultSet processing: DataReader.FieldCount: {0} DataReader.RecordsAffected: {1} - + Batch parser wrapper execution engine batch ResultSet finished. - + Canceling batch parser wrapper batch execution. - + Scripting warning. - + For more information about this error, see the troubleshooting topics in the product documentation. - + File '{0}' recursively included. - + Missing end comment mark '*/'. - + Unclosed quotation mark after the character string. - + Incorrect syntax was encountered while parsing '{0}'. - + Variable {0} is not defined. - + EN_LOCALIZATION - + Decimal column is missing numeric precision or numeric scale - - + + diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings index aeac66c1..62c4a461 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings @@ -206,6 +206,8 @@ EditDataComputedColumnPlaceholder = EditDataInitializeInProgress = Another edit data initialize is in progress for this owner URI. Please wait for completion. +EditDataTimeOver24Hrs = TIME column values must be between 00:00:00.0000000 and 23:59:59.9999999 + EditDataNullNotAllowed = NULL is not allowed for this column ############################################################################ diff --git a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf index 2ede8d52..094eef5f 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf +++ b/src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf @@ -551,6 +551,11 @@ Cannot add row to result buffer, data reader does not contain rows + + TIME column values must be between 00:00:00.0000000 and 23:59:59.9999999 + TIME column values must be between 00:00:00.0000000 and 23:59:59.9999999 + + NULL is not allowed for this column NULL is not allowed for this column diff --git a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs index 064329cf..4ed3c557 100644 --- a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs +++ b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs @@ -166,6 +166,17 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.EditData Assert.Throws(() => new CellUpdate(col, "12345")); } + [Theory] + [InlineData("24:00:00")] + [InlineData("105:00:00")] + public void TimeSpanTooLargeTest(string value) + { + // If: I create a cell update for a timespan column and provide a value that is over 24hrs + // Then: It should throw an exception + DbColumnWrapper col = GetWrapper("time"); + Assert.Throws(() => new CellUpdate(col, value)); + } + [Theory] [MemberData(nameof(RoundTripTestParams))] public void RoundTripTest(DbColumnWrapper col, object obj)