forked from Azure/azure-service-bus-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.go
25 lines (23 loc) · 1.04 KB
/
action.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package servicebus
type (
// SQLAction represents a SQL language-based action expression that is evaluated against a BrokeredMessage. A
// SQLAction supports a subset of the SQL-92 standard.
//
// With SQL filter conditions, you can define an action that can annotate the message by adding, removing, or
// replacing properties and their values. The action uses a SQL-like expression that loosely leans on the SQL
// UPDATE statement syntax. The action is performed on the message after it has been matched and before the message
// is selected into the subscription. The changes to the message properties are private to the message copied into
// the subscription.
//
// see: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-sql-filter
SQLAction struct {
Expression string
}
)
// ToActionDescription will transform the SqlAction into a ActionDescription
func (sf SQLAction) ToActionDescription() ActionDescription {
return ActionDescription{
Type: "SqlRuleAction",
SQLExpression: sf.Expression,
}
}