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


Python StandardNormalizer.normalize方法代碼示例

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


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

示例1: normalize

# 需要導入模塊: from StandardNormalizer import StandardNormalizer [as 別名]
# 或者: from StandardNormalizer.StandardNormalizer import normalize [as 別名]
def normalize(table, sql):
    """Normalizes results by rounding numbers, including those found in a
       string (VARCHAR) column representing a GEOGRAPHY_POINT or GEOGRAPHY
       (point or polygon) to the specified number of significant digits; the
       result tuples of ORDER BY statements are not reordered.
    """
    return StandardNormalizer.normalize(table, sql, SortNulls.never, 8)
開發者ID:87439247,項目名稱:voltdb,代碼行數:9,代碼來源:geo-normalizer.py

示例2: normalize

# 需要導入模塊: from StandardNormalizer import StandardNormalizer [as 別名]
# 或者: from StandardNormalizer.StandardNormalizer import normalize [as 別名]
def normalize(table, sql):
    """Normalizes the result tuples of ORDER BY statements in the default
       manner, without sorting SQL NULL (Python None) values at all; in some
       cases, this could lead to mismatches between HSqlDB, which always sorts
       NULL values first, and VoltDB, which sorts NULL values as if they were
       the lowest value (first with ORDER BY ASC, last with ORDER BY DESC), in
       which case you could use a different normalizer, such as
       nulls-lowest-normalizer.py.
    """
    return StandardNormalizer.normalize(table, sql, SortNulls.never)
開發者ID:royxhl,項目名稱:voltdb,代碼行數:12,代碼來源:normalizer.py

示例3: normalize

# 需要導入模塊: from StandardNormalizer import StandardNormalizer [as 別名]
# 或者: from StandardNormalizer.StandardNormalizer import normalize [as 別名]
def normalize(table, sql, num_digits=12, sort_nulls=SortNulls.never):
    """Normalizes the result tuples of ORDER BY statements in the default
       manner, without sorting SQL NULL (Python None) values at all; in some
       cases, this could lead to mismatches between HSqlDB, which always sorts
       NULL values first, and VoltDB, which sorts NULL values as if they were
       the lowest value (first with ORDER BY ASC, last with ORDER BY DESC), in
       which case you could use a different normalizer, such as
       nulls-lowest-normalizer.py. Also rounds numbers, including those found
       in a string (VARCHAR) column representing a GEOGRAPHY_POINT or GEOGRAPHY
       (point or polygon) to the specified number of significant digits; the
       result tuples of ORDER BY statements are not reordered.
    """
    return StandardNormalizer.normalize(table, sql, num_digits, sort_nulls)
開發者ID:simonzhangsm,項目名稱:voltdb,代碼行數:15,代碼來源:normalizer.py

示例4: normalize

# 需要導入模塊: from StandardNormalizer import StandardNormalizer [as 別名]
# 或者: from StandardNormalizer.StandardNormalizer import normalize [as 別名]
def normalize(table, sql):
    """Normalizes the result tuples of ORDER BY statements, sorting SQL NULL
       (Python None) values as if they were the lowest values, i.e., first
       when using ORDER BY col1 ASC, but last when using ORDER BY col1 DESC.
    """
    return StandardNormalizer.normalize(table, sql, SortNulls.lowest)
開發者ID:AdvEnc,項目名稱:voltdb,代碼行數:8,代碼來源:nulls-lowest-normalizer.py

示例5: normalize

# 需要導入模塊: from StandardNormalizer import StandardNormalizer [as 別名]
# 或者: from StandardNormalizer.StandardNormalizer import normalize [as 別名]
def normalize(table, sql):
    """Normalizes the result tuples of ORDER BY statements, sorting SQL NULL
       (Python None) values first (whether using ORDER BY ASC or DESC).
    """
    return StandardNormalizer.normalize(table, sql, SortNulls.first)
開發者ID:kumarrus,項目名稱:voltdb,代碼行數:7,代碼來源:nulls-first-normalizer.py


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