---
name: "Prophet::Replica::sqlite"
section: "3pm"
platform: "linux"
package: "libprophet-perl"
version: "0.743-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/Prophet::Replica::sqlite"
---

# Prophet::Replica::sqlite(3pm)

## METHODS

### replica\_exists

Returns true if the replica already exists / has been initialized. Returns false otherwise.

### replica\_version

Returns this replica's version.

### set\_replica\_version

Sets the replica's version to the given integer.

### uuid

Return the replica  UUID

## Internals of record handling

### traverse\_changesets { after =\> SEQUENCE\_NO, UNTIL =\> SEQUENCE\_NO, callback =\> sub { } }

Walks through all changesets from `$after` to `$until`, calling `$callback` on each.

If no `$until` is specified, the latest changeset is assumed.

### changesets\_for\_record { uuid =\> $uuid, type =\> $type, limit =\> $int }

Returns an ordered set of changeset objects for all changesets containing changes to this object.

If "limit" is specified, only returns that many changesets (starting from record creation).

Note that changesets may include changes to other records

### list\_records { type =\> $type }

Returns a reference to a list of record objects for all records of type `$type`.

Order is not guaranteed.

### read\_userdata\_file

Returns the contents of the given file in this replica's userdata directory. Returns `"undef"` if the file does not exist.

### write\_userdata\_file

Writes the given string to the given file in this replica's userdata directory.

## Working with luids
