Skip to content

PersistRequest: No NodeConfiguration usage #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ChangeLog/7.1.1-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
[main] Improved memory efficency of cached queries.
[main] Improved memory efficency of cached queries.
[main] One of PersistRequest's constructors marked obsolete since it is no loger in use
16 changes: 12 additions & 4 deletions Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public sealed class PersistRequest

public IEnumerable<PersistParameterBinding> ParameterBindings { get; private set; }

internal NodeConfiguration NodeConfiguration { get; private set; }

public SqlCompilationResult GetCompiledStatement()
{
if (compiledStatement==null)
Expand All @@ -50,10 +48,21 @@ public void Prepare()

public PersistRequest(
StorageDriver driver, SqlStatement statement, IEnumerable<PersistParameterBinding> parameterBindings)
: this(driver, statement, parameterBindings, null)
{
ArgumentValidator.EnsureArgumentNotNull(driver, "driver");
ArgumentValidator.EnsureArgumentNotNull(statement, "statement");

var compileUnit = statement as ISqlCompileUnit;
if (compileUnit == null)
throw new ArgumentException("Statement is not ISqlCompileUnit");

this.driver = driver;
Statement = statement;
CompileUnit = compileUnit;
ParameterBindings = ParameterBinding.NormalizeBindings(parameterBindings);
}

[Obsolete]
public PersistRequest(
StorageDriver driver, SqlStatement statement, IEnumerable<PersistParameterBinding> parameterBindings, NodeConfiguration nodeConfiguration)
{
Expand All @@ -68,7 +77,6 @@ public PersistRequest(
Statement = statement;
CompileUnit = compileUnit;
ParameterBindings = ParameterBinding.NormalizeBindings(parameterBindings);
NodeConfiguration = nodeConfiguration;
}
}
}