Skip to content

Commit

Permalink
Added support for aggregate function expressions. Closes #50.
Browse files Browse the repository at this point in the history
  • Loading branch information
hisystems committed Apr 10, 2012
1 parent a912d67 commit 831dfa1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions DatabaseObjects.vbproj
Expand Up @@ -190,6 +190,7 @@
<Compile Include="Misc\AssemblyInfo.vb" />
<Compile Include="SQL\Amend\SQLInsertFromSelect.vb" />
<Compile Include="SQL\Amend\SQLUpdateField.vb" />
<Compile Include="SQL\Expressions\SQLAggregateExpression.vb" />
<Compile Include="SQL\Expressions\SQLAllFieldsExpression.vb" />
<Compile Include="SQL\Expressions\SQLRightFunctionExpression.vb" />
<Compile Include="SQL\Expressions\SQLArithmeticExpression.vb" />
Expand Down
33 changes: 33 additions & 0 deletions SQL/Expressions/SQLAggregateExpression.vb
@@ -0,0 +1,33 @@

' ___________________________________________________
'
'  © Hi-Integrity Systems 2012. All rights reserved.
'  www.hisystems.com.au - Toby Wicks
' ___________________________________________________
'

Option Strict On
Option Explicit On

Namespace SQL

Public Class SQLAggregateExpression
Inherits SQLFunctionExpression

Public Sub New(ByVal aggregate As AggregateFunction, ByVal fieldName As String)

Me.New(aggregate, New SQLFieldExpression(fieldName))

End Sub

Public Sub New(ByVal aggregate As AggregateFunction, ByVal expression As SQLExpression)

MyBase.New(Misc.SQLConvertAggregate(aggregate), expression)

End Sub

End Class

End Namespace


0 comments on commit 831dfa1

Please sign in to comment.