當前位置: 首頁>>代碼示例>>Python>>正文


Python MySQLWrapper.delete方法代碼示例

本文整理匯總了Python中DIRAC.ResourceStatusSystem.Utilities.MySQLWrapper.delete方法的典型用法代碼示例。如果您正苦於以下問題:Python MySQLWrapper.delete方法的具體用法?Python MySQLWrapper.delete怎麽用?Python MySQLWrapper.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DIRAC.ResourceStatusSystem.Utilities.MySQLWrapper的用法示例。


在下文中一共展示了MySQLWrapper.delete方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: delete

# 需要導入模塊: from DIRAC.ResourceStatusSystem.Utilities import MySQLWrapper [as 別名]
# 或者: from DIRAC.ResourceStatusSystem.Utilities.MySQLWrapper import delete [as 別名]
  def delete( self, params, meta ):
    '''
    Uses arguments to build conditional SQL statement ( WHERE ... ). If the
    sql statement desired is more complex, you can use kwargs to interact with
    the MySQL buildCondition parser and generate a more sophisticated query. 
    There is only one forbidden query, with all parameters None ( this would 
    mean a query of the type `DELETE * from TableName` ). The usage of kwargs 
    is the same as in the get function.

    :Parameters:
      **params** - `dict`
        arguments for the mysql query ( must match table columns ! ).

      **meta** - `dict`
        metadata for the mysql query. It must contain, at least, `table` key
        with the proper table name.

    :return: S_OK() || S_ERROR()
    '''
    return MySQLWrapper.delete( self, params, meta )
開發者ID:cgrefe,項目名稱:DIRAC,代碼行數:22,代碼來源:ResourceManagementDB.py


注:本文中的DIRAC.ResourceStatusSystem.Utilities.MySQLWrapper.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。