@@ -28,8 +28,6 @@ public sealed class PersistRequest
28
28
29
29
public IEnumerable < PersistParameterBinding > ParameterBindings { get ; private set ; }
30
30
31
- internal NodeConfiguration NodeConfiguration { get ; private set ; }
32
-
33
31
public SqlCompilationResult GetCompiledStatement ( )
34
32
{
35
33
if ( compiledStatement == null )
@@ -50,10 +48,21 @@ public void Prepare()
50
48
51
49
public PersistRequest (
52
50
StorageDriver driver , SqlStatement statement , IEnumerable < PersistParameterBinding > parameterBindings )
53
- : this ( driver , statement , parameterBindings , null )
54
51
{
52
+ ArgumentValidator . EnsureArgumentNotNull ( driver , "driver" ) ;
53
+ ArgumentValidator . EnsureArgumentNotNull ( statement , "statement" ) ;
54
+
55
+ var compileUnit = statement as ISqlCompileUnit ;
56
+ if ( compileUnit == null )
57
+ throw new ArgumentException ( "Statement is not ISqlCompileUnit" ) ;
58
+
59
+ this . driver = driver ;
60
+ Statement = statement ;
61
+ CompileUnit = compileUnit ;
62
+ ParameterBindings = ParameterBinding . NormalizeBindings ( parameterBindings ) ;
55
63
}
56
64
65
+ [ Obsolete ]
57
66
public PersistRequest (
58
67
StorageDriver driver , SqlStatement statement , IEnumerable < PersistParameterBinding > parameterBindings , NodeConfiguration nodeConfiguration )
59
68
{
@@ -68,7 +77,6 @@ public PersistRequest(
68
77
Statement = statement ;
69
78
CompileUnit = compileUnit ;
70
79
ParameterBindings = ParameterBinding . NormalizeBindings ( parameterBindings ) ;
71
- NodeConfiguration = nodeConfiguration ;
72
80
}
73
81
}
74
82
}
0 commit comments