react-native-background-geolocation@5.0.0-beta.1
    Preparing search index...

    Interface SQLQuery

    Used for selecting a range of records from the SDK's log database.

    Used with:

    // Constrain results between optional start/end dates using an SQLQuery
    const log = await BackgroundGeolocation.logger.getLog({
    start: Date.parse("2019-10-21 13:00"), // <-- optional HH:mm:ss
    end: Date.parse("2019-10-22")
    });

    // Or just a start date
    const partial = await BackgroundGeolocation.logger.getLog({
    start: Date.parse("2019-10-21 13:00")
    });

    // Or just an end date
    await BackgroundGeolocation.logger.uploadLog("https://my.server.com/users/123/logs", {
    end: Date.parse("2019-10-21")
    });

    // Select first 100 records from log (ascending)
    const Logger = BackgroundGeolocation.logger;
    await Logger.emailLog("foo@bar.com", {
    order: SQLQueryOrder.Asc,
    limit: 100
    });

    // Select most recent 100 records from log (descending)
    await Logger.emailLog("foo@bar.com", {
    order: SQLQueryOrder.Desc,
    limit: 100
    });
    interface SQLQuery {
        start?: number;
        end?: number;
        limit?: number;
        offset?: number;
        order?: SQLQueryOrder;
    }
    Index

    Properties

    start?: number

    Start date of logs to select (unix timestamp in milliseconds).

    end?: number

    End date of logs to select (unix timestamp in milliseconds).

    limit?: number

    Limit number of records returned.

    offset?: number

    Offset into the result set (for paging).

    Sort order for results.

    • SQLQueryOrder.Asc → ascending by time
    • SQLQueryOrder.Desc → descending by time

    Historically this corresponded to:

    • 1 = ASC
    • -1 = DESC