---
name: "UR::DataSource::SQLite"
section: "3pm"
platform: "linux"
package: "libur-perl"
version: "0.470+ds-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/UR::DataSource::SQLite"
---

# UR::DataSource::SQLite(3pm)

base class for datasources using the SQLite3 RDBMS

## NAME

UR::DataSource::SQLite - base class for datasources using the SQLite3 RDBMS

## SYNOPSIS

In the shell:

```
    ur define datasource sqlite
```

Or write the singleton to represent the source directly:

```
    class Acme::DataSource::MyDB1 {
        is => 'UR::DataSource::SQLite',
        has_constant => [
            server => '/var/lib/acme-app/mydb1.sqlitedb'
        ]
    };
```

You may also use a directory containing \*.sqlite3 files.  The primary database must be named main.sqlite3.  All the other \*.sqlite3 files are attached when the database is opened.

```
    class Acme::DataSource::MyDB2 {
        is => 'UR::DataSource::SQLite',
        has_constant => [
            server => '/path/to/directory/'
        ]
    };
```
