PostgreSQL

<dependency>
	<groupId>org.eclipse.store</groupId>
	<artifactId>afs-sql</artifactId>
	<version>2.1.0</version>
</dependency>
<dependency>
	<groupId>org.postgresql</groupId>
	<artifactId>postgresql</artifactId>
	<version>42.2.14</version>
</dependency>
PGSimpleDataSource dataSource = new PGSimpleDataSource();
dataSource.setUrl("jdbc:postgresql://localhost:5432/mydb");
dataSource.setUser("postgres");
dataSource.setPassword("secret");

SqlFileSystem fileSystem = SqlFileSystem.New(
	SqlConnector.Caching(
		SqlProviderPostgres.New(dataSource)
	)
);

EmbeddedStorage.start(fileSystem.ensureDirectoryPath("storage"));

Configuration

When using external configuration PostgreSQL can be set as follows. Please note that you have to define a data source provider.

eclipsestore.properties
# optional, enforces checks
storage-filesystem.target=sql.postgres

storage-filesystem.sql.postgres.data-source-provider=com.sample.MyDataSourceProvider
storage-filesystem.sql.postgres.catalog=mycatalog
storage-filesystem.sql.postgres.schema=myschema
storage-filesystem.sql.postgres.url=jdbc:postgresql://localhost:5432/mydb
storage-filesystem.sql.postgres.user=username
storage-filesystem.sql.postgres.password=secret
MyDataSourceProvider.java
package com.sample;

import org.eclipse.afs.sql.types.SqlDataSourceProvider

public class MyDataSourceProvider implements SqlDataSourceProvider
{
	public DataSource provideDataSource(Configuration configuration)
	{
		String url      = configuration.get("url");
		String user     = configuration.get("user");
		String password = configuration.get("password");
		// TODO: return data source of your choice, e.g. from a connection pool
	}
}
Depending on the amount of data and transactions, charges may apply depending on service usage. Please check with your service provider for details.