File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace NHibernate
2
+ {
3
+ // 6.0 TODO: merge into IQueryOver<TRoot>
4
+ public static class QueryOverExtensions
5
+ {
6
+ /// <summary>
7
+ /// Set a timeout for the underlying ADO.NET query.
8
+ /// </summary>
9
+ /// <param name="queryOver">The query on which to set the timeout.</param>
10
+ /// <param name="timeout">The timeout in seconds.</param>
11
+ /// <returns><see langword="this" /> (for method chaining).</returns>
12
+ public static IQueryOver < TRoot > SetTimeout < TRoot > ( this IQueryOver < TRoot > queryOver , int timeout )
13
+ {
14
+ queryOver . RootCriteria . SetTimeout ( timeout ) ;
15
+ return queryOver ;
16
+ }
17
+
18
+ /// <summary>
19
+ /// Set a fetch size for the underlying ADO query.
20
+ /// </summary>
21
+ /// <param name="queryOver">The query on which to set the timeout.</param>
22
+ /// <param name="fetchSize">The fetch size.</param>
23
+ /// <returns><see langword="this" /> (for method chaining).</returns>
24
+ public static IQueryOver < TRoot > SetFetchSize < TRoot > ( this IQueryOver < TRoot > queryOver , int fetchSize )
25
+ {
26
+ queryOver . RootCriteria . SetFetchSize ( fetchSize ) ;
27
+ return queryOver ;
28
+ }
29
+
30
+ /// <summary>
31
+ /// Add a comment to the generated SQL.
32
+ /// </summary>
33
+ /// <param name="queryOver">The query on which to set the timeout.</param>
34
+ /// <param name="comment">A human-readable string.</param>
35
+ /// <returns><see langword="this" /> (for method chaining).</returns>
36
+ public static IQueryOver < TRoot > SetComment < TRoot > ( this IQueryOver < TRoot > queryOver , string comment )
37
+ {
38
+ queryOver . RootCriteria . SetComment ( comment ) ;
39
+ return queryOver ;
40
+ }
41
+ }
42
+ }
You can’t perform that action at this time.
0 commit comments