Commits

Zhang Huangbin committed 50b3644

Add sample to run RAW SQL command.

  • Participants
  • Parent commits d66ca42

Comments (0)

Files changed (1)

File src/plugins/sql_alias_access_policy.py

 
 def restriction(dbConn, senderReceiver, smtpSessionData, **kargs):
     # Get alias account from alias table.
+    # If you need to run RAW SQL command, use dbConn.query() instead.
+    # Reference: http://webpy.org/cookbook/query
+    # Sample:
+    #   result = dbConn.query('''SELECT * FROM alias WHERE address=$recipient''', vars=senderReceiver,)
+
     result = dbConn.select('alias',
         senderReceiver, where='address = $recipient AND domain = $recipient_domain',
     )