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


TypeScript Query.skip方法代碼示例

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


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

示例1: test_query

function test_query() {

    var TestObject = AV.Object.extend('TestObject')
    var todoObject = new TestObject();

    var query = new AV.Query(TestObject);

    query.equalTo("testString", "leancloud");
    query.notEqualTo("testString", "aws");
    query.greaterThan("testInteger", 150);
    query.limit(10);
    query.skip(10);

    // Sorts the results in ascending order by the score field
    query.ascending("testString");

    // Sorts the results in descending order by the score field
    query.descending("testString");

    // Restricts to wins < 50
    query.lessThan("testInteger", 50);

    // Restricts to wins <= 50
    query.lessThanOrEqualTo("testInteger", 50);

    // Restricts to wins > 50
    query.greaterThan("testInteger", 50);

    // Restricts to wins >= 50
    query.greaterThanOrEqualTo("testInteger", 50);

    // Finds scores from any of Jonathan, Dario, or Shawn
    query.containedIn("testString",
                      ["leancloud", "aws", "azure"]);

    // Finds scores from anyone who is neither Jonathan, Dario, nor Shawn
    query.notContainedIn("testString",
                         ["leancloud", "aws", "azure"]);

    // Finds objects that have the score set
    query.exists("testInteger");

    // Finds objects that don't have the score set
    query.doesNotExist("testInteger");

    query.select("testInteger", "leancloud");

    // Find objects where the array in arrayKey contains 2.
    query.equalTo("arrayKey", 2);

    // Find objects where the array in arrayKey contains all of the elements 2, 3, and 4.
    query.containsAll("arrayKey", [2, 3, 4]);

    query.startsWith("testString", "l");
}
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:55,代碼來源:avoscloud-sdk-tests.ts


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