hunk.code_window:         return query
       def whereQuery(self, query):
           if conf.dumpWhere and query:
               prefix, suffix = query.split(" ORDER BY ") if " ORDER BY " in query else (query, "")
               if conf.tbl and "%s)" % conf.tbl.upper() in prefix.upper():
                   prefix = re.sub(r"(?i)%s\)" % re.escape(conf.tbl), "%s WHERE %s)" % (conf.tbl, conf.dumpWhere), prefix)
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:             match = re.search(r" (LIMIT|ORDER).+", query, re.I)
               if match:
                   suffix = match.group(0)
                   prefix = query[:-len(suffix)]
               else:
                   prefix, suffix = query, ""
  
hunk.file_path: lib/core/agent.py
hunk.type: replace
file: <?xml version="1.0" encoding="windows-1250"?>
  <VisualStudioProject
  	ProjectType="Visual C++"
  	Version="8,00"
  	Name="runcmd"
  	ProjectGUID="{1C6185A9-871A-4F6E-9B2D-BE4399479784}"
  	RootNamespace="runcmd"
  	Keyword="Win32Proj"
  	>
  	<Platforms>
  		<Platform
  			Name="Win32"
  		/>
  	</Platforms>
  	<ToolFiles>
  	</ToolFiles>
  	<Configurations>
  		<Configuration
  			Name="Debug|Win32"
  			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  			IntermediateDirectory="$(ConfigurationName)"
  			ConfigurationType="1"
  			CharacterSet="1"
  			>
  			<Tool
  				Name="VCPreBuildEventTool"
  			/>
  			<Tool
  				Name="VCCustomBuildTool"
  			/>
  			<Tool
  				Name="VCXMLDataGeneratorTool"
  			/>
  			<Tool
  				Name="VCWebServiceProxyGeneratorTool"
  			/>
  			<Tool
  				Name="VCMIDLTool"
  			/>
  			<Tool
  				Name="VCCLCompilerTool"
  				Optimization="0"
  				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
  				MinimalRebuild="true"
  				BasicRuntimeChecks="3"
  				RuntimeLibrary="0"
  				UsePrecompiledHeader="2"
  				WarningLevel="3"
  				Detect64BitPortabilityProblems="true"
  				DebugInformationFormat="4"
  			/>
  			<Tool
  				Name="VCManagedResourceCompilerTool"
  			/>
  			<Tool
  				Name="VCResourceCompilerTool"
  			/>
  			<Tool
  				Name="VCPreLinkEventTool"
  			/>
  			<Tool
  				Name="VCLinkerTool"
  				LinkIncremental="2"
  				GenerateDebugInformation="true"
  				SubSystem="1"
  				TargetMachine="1"
  			/>
  			<Tool
  				Name="VCALinkTool"
  			/>
  			<Tool
  				Name="VCManifestTool"
  			/>
  			<Tool
  				Name="VCXDCMakeTool"
  			/>
  			<Tool
  				Name="VCBscMakeTool"
  			/>
  			<Tool
  				Name="VCFxCopTool"
  			/>
  			<Tool
  				Name="VCAppVerifierTool"
  			/>
  			<Tool
  				Name="VCWebDeploymentTool"
  			/>
  			<Tool
  				Name="VCPostBuildEventTool"
  			/>
  		</Configuration>
  		<Configuration
  			Name="Release|Win32"
  			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  			IntermediateDirectory="$(ConfigurationName)"
  			ConfigurationType="1"
  			CharacterSet="1"
  			WholeProgramOptimization="1"
  			>
  			<Tool
  				Name="VCPreBuildEventTool"
  			/>
  			<Tool
  				Name="VCCustomBuildTool"
  			/>
  			<Tool
  				Name="VCXMLDataGeneratorTool"
  			/>
  			<Tool
  				Name="VCWebServiceProxyGeneratorTool"
  			/>
  			<Tool
  				Name="VCMIDLTool"
  			/>
  			<Tool
  				Name="VCCLCompilerTool"
  				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
  				RuntimeLibrary="0"
  				UsePrecompiledHeader="2"
  				WarningLevel="3"
  				Detect64BitPortabilityProblems="true"
  				DebugInformationFormat="3"
  			/>
  			<Tool
  				Name="VCManagedResourceCompilerTool"
  			/>
  			<Tool
  				Name="VCResourceCompilerTool"
  			/>
  			<Tool
  				Name="VCPreLinkEventTool"
  			/>
  			<Tool
  				Name="VCLinkerTool"
  				LinkIncremental="1"
  				GenerateDebugInformation="true"
  				SubSystem="1"
  				OptimizeReferences="2"
  				EnableCOMDATFolding="2"
  				TargetMachine="1"
  			/>
  			<Tool
  				Name="VCALinkTool"
  			/>
  			<Tool
  				Name="VCManifestTool"
  			/>
  			<Tool
  				Name="VCXDCMakeTool"
  			/>
  			<Tool
  				Name="VCBscMakeTool"
  			/>
  			<Tool
  				Name="VCFxCopTool"
  			/>
  			<Tool
  				Name="VCAppVerifierTool"
  			/>
  			<Tool
  				Name="VCWebDeploymentTool"
  			/>
  			<Tool
  				Name="VCPostBuildEventTool"
  			/>
  		</Configuration>
  	</Configurations>
  	<References>
  	</References>
  	<Files>
  		<Filter
  			Name="Source Files"
  			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
  			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
  			>
  			<File
  				RelativePath=".\runcmd.cpp"
  				>
  			</File>
  			<File
  				RelativePath=".\stdafx.cpp"
  				>
  				<FileConfiguration
  					Name="Debug|Win32"
  					>
  					<Tool
  						Name="VCCLCompilerTool"
  						UsePrecompiledHeader="1"
  					/>
  				</FileConfiguration>
  				<FileConfiguration
  					Name="Release|Win32"
  					>
  					<Tool
  						Name="VCCLCompilerTool"
  						UsePrecompiledHeader="1"
  					/>
  				</FileConfiguration>
  			</File>
  		</Filter>
  		<Filter
  			Name="Header Files"
  			Filter="h;hpp;hxx;hm;inl;inc;xsd"
  			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
  			>
  			<File
  				RelativePath=".\stdafx.h"
  				>
  			</File>
  		</Filter>
  		<Filter
  			Name="Resource Files"
  			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
  			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
  			>
  		</Filter>
  		<File
  			RelativePath=".\ReadMe.txt"
  			>
  		</File>
  	</Files>
  	<Globals>
  	</Globals>
  </VisualStudioProject>
  