33// See the License.txt file in the project root for more information.
44
55using System ;
6+ using Xtensive . Reflection ;
67using Xtensive . Sql ;
78using Xtensive . Sql . Dml ;
89using Operator = Xtensive . Reflection . WellKnown . Operator ;
@@ -43,6 +44,13 @@ public static SqlExpression TimeOnlyTicks(SqlExpression _this)
4344 #endregion
4445
4546 #region Constructors
47+ [ Compiler ( typeof ( TimeOnly ) , null , TargetKind . Constructor ) ]
48+ public static SqlExpression TimeOnlyCtor (
49+ [ Type ( typeof ( int ) ) ] SqlExpression hour ,
50+ [ Type ( typeof ( int ) ) ] SqlExpression minute ,
51+ [ Type ( typeof ( int ) ) ] SqlExpression second ,
52+ [ Type ( typeof ( int ) ) ] SqlExpression millisecond ) =>
53+ SqlDml . TimeConstruct ( hour , minute , second , millisecond ) ;
4654
4755 [ Compiler ( typeof ( TimeOnly ) , null , TargetKind . Constructor ) ]
4856 public static SqlExpression TimeOnlyCtor (
@@ -57,9 +65,9 @@ public static SqlExpression TimeOnlyCtor(
5765 [ Type ( typeof ( int ) ) ] SqlExpression minute ) =>
5866 SqlDml . TimeConstruct ( hour , minute , 0 , 0 ) ;
5967
60- [ Compiler ( typeof ( TimeOnly ) , null , TargetKind . Constructor ) ]
61- public static SqlExpression TimeOnlyCtor ( [ Type ( typeof ( long ) ) ] SqlExpression ticks ) =>
62- new SqlFunctionCall ( SqlFunctionType . TimeConstruct , ticks ) ;
68+ // [Compiler(typeof(TimeOnly), null, TargetKind.Constructor)]
69+ // public static SqlExpression TimeOnlyCtor([Type(typeof(long))] SqlExpression ticks) =>
70+ // new SqlFunctionCall(SqlFunctionType.TimeConstruct, ticks);
6371
6472 #endregion
6573
@@ -123,10 +131,6 @@ public static SqlExpression TimeOnlyOperatorSubtraction(
123131
124132 #endregion
125133
126- [ Compiler ( typeof ( TimeOnly ) , "Add" ) ]
127- public static SqlExpression TimeOnlyAdd ( SqlExpression _this , [ Type ( typeof ( TimeSpan ) ) ] SqlExpression value ) =>
128- throw new NotImplementedException ( ) ;
129-
130134 [ Compiler ( typeof ( TimeOnly ) , "AddHours" ) ]
131135 public static SqlExpression TimeOnlyAddHours ( SqlExpression _this , [ Type ( typeof ( double ) ) ] SqlExpression value ) =>
132136 SqlDml . TimeAddHours ( _this , value ) ;
@@ -145,7 +149,6 @@ public static SqlExpression TimeOnlyToStringIso(SqlExpression _this)
145149 public static SqlExpression TimeOnlyToStringIso ( SqlExpression _this , [ Type ( typeof ( string ) ) ] SqlExpression value )
146150 {
147151 throw new NotImplementedException ( ) ;
148-
149152 //var stringValue = value as SqlLiteral<string>;
150153
151154 //if (stringValue == null)
0 commit comments