Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

RhomSource API

Exposes sync information, which you can use for alerts, status pages, and so on.

For examples, refer to Accessing Sync Info with RhomSource in Using the Local Database with Rhom.

find

Returns a RhomSource object. Refer to Accessing Sync Info with RhomSource for an example.

@source = RhomSource.find(source_name)
source_name The name of the source on the RhoConnect server.

distinct_objects

Returns the number of records for this source.

@source.distinct_objects
  #=> 837

last_deleted_size

Returns the number of records deleted on the last sync.

@source.last_deleted_size
  #=> 1

last_inserted_size

Returns the number of records inserted on last sync.

@source.last_inserted_size
  #=> 3

last_sync_duration

Returns the duration in milliseconds of the last sync for this source.

@source.last_sync_duration
  #=> 7

last_sync_success

Returns 1 if last sync was successful, 0 if it failed.

@source.last_sync_success
  #=> 1

last_updated

Returns the last time the source was synchronized in Time.at format. Refer to Accessing Sync Info with RhomSource for examples.

@source.last_updated.to_s
  #=> "Wed Jan 19 18:35:05 -0800 2011"

name

Returns a string: the name of the source.

@source.name
  #=> "Product"

source_id

Returns the id number of a source.

@source.source_id
  #=> 1
Back to Top