sdk/src/sync/pull.js
function pullPage() {

        // Define appropriate parameter to enable fetching of deleted records from the server.
        // Assumption is that soft delete is enabled on the server table.
        var params = {};
        params[tableConstants.includeDeletedFlag] = true;

        var pulledRecords;
        
        // azure-query-js does not support datatimeoffset
        // As a temporary workaround, convert the query to an odata string and replace datetime' with datetimeoffset'. 
        var queryString = pagePullQuery.toOData();
        var tableName = pagePullQuery.getComponents().table;
        queryString = queryString.replace(new RegExp('^/' + tableName), '').replace("datetime'", "datetimeoffset'");

        return mobileServiceTable.read(queryString, params).then(function(result) {
            pulledRecords = result || [];

            var chain = Platform.async(function(callback) {
                callback();
            })();
            
            // Process all records in the page
            for (var i = 0; i < pulledRecords.length; i++) {
                chain = processPulledRecord(chain, tableName, pulledRecords[i]); 
            }

            return chain;
        }).then(function(pulled) {
            return onPagePulled();
        }).then(function() {
            return pulledRecords;
        });
    }
function pullPage() {

        // Define appropriate parameter to enable fetching of deleted records from the server.
        // Assumption is that soft delete is enabled on the server table.
        var params = {};
        params[tableConstants.includeDeletedFlag] = true;

        var pulledRecords;
        
        // azure-query-js does not support datatimeoffset
        // As a temporary workaround, convert the query to an odata string and replace datetime' with datetimeoffset'. 
        var queryString = pagePullQuery.toOData();
        var tableName = pagePullQuery.getComponents().table;
        queryString = queryString.replace(new RegExp('^/' + tableName), '').replace("datetime'", "datetimeoffset'");

        return mobileServiceTable.read(queryString, params).then(function(result) {
            pulledRecords = result || [];

            var chain = Platform.async(function(callback) {
                callback();
            })();
            
            // Process all records in the page
            for (var i = 0; i < pulledRecords.length; i++) {
                chain = processPulledRecord(chain, tableName, pulledRecords[i]); 
            }

            return chain;
        }).then(function(pulled) {
            return onPagePulled();
        }).then(function() {
            return pulledRecords;
        });
    }
function pullPage ( ) { // Define appropriate parameter to enable fetching of deleted records from the server. // Assumption is that soft delete is enabled on the server table. var params = { } ; params [ tableConstants . includeDeletedFlag ] = true ; var pulledRecords ; // azure-query-js does not support datatimeoffset // As a temporary workaround, convert the query to an odata string and replace datetime' with datetimeoffset'.  var queryString = pagePullQuery . toOData ( ) ; var tableName = pagePullQuery . getComponents ( ) . table ; queryString = queryString . replace ( new RegExp ( '^/' + tableName ) , '' ) . replace ( "datetime'" , "datetimeoffset'" ) ; return mobileServiceTable . read ( queryString , params ) . then ( function ( result ) { pulledRecords = result || [ ] ; var chain = Platform . async ( function ( callback ) { callback ( ) ; } ) ( ) ; // Process all records in the page for ( var i = 0 ; i < pulledRecords . length ; i ++ ) { chain = processPulledRecord ( chain , tableName , pulledRecords [ i ] ) ; } return chain ; } ) . then ( function ( pulled ) { return onPagePulled ( ) ; } ) . then ( function ( ) { return pulledRecords ; } ) ; }
Pull the page as described by the query
Pull the page as described by the query