newShadertoySqliteLocalStore function
Creates a ShadertoyStore
backed by a local ShadertoySqliteStore
path
: The path to the databaseforeignKeysEnabled
: If the foreign keys are enabledlogStatementsEnabled
: If true (defaults tofalse
), generated sql statements will be printed before executing.webBackend
: The web backend to usesqliteWasmPath
: The sqlite wasm path for the wasm backendshaderCount
: The number of shaders requested for a paged calluserShaderCount
: The number of shaders requested for a user paged callplaylistShaderCount
: The number of shaders requested for a playlist paged callerrorHandling
: The error handling mode
Implementation
Future<ShadertoyStore> newShadertoySqliteLocalStore(
{String? path,
bool? foreignKeysEnabled,
bool? logStatementsEnabled,
WebBackend? webBackend,
String? sqliteWasmPath,
int? shaderCount,
int? userShaderCount,
int? playlistShaderCount,
ErrorMode? errorHandling}) async {
final options = getOptions(
path: path,
foreignKeysEnabled: foreignKeysEnabled,
logStatementsEnabled: logStatementsEnabled,
webBackend: webBackend,
sqliteWasmPath: sqliteWasmPath,
shaderCount: shaderCount,
userShaderCount: userShaderCount,
playlistShaderCount: playlistShaderCount,
errorHandling: errorHandling);
return localExecutor(options)
.then((executor) => _newStore(executor, options))
.then((store) => ShadertoySqliteStore(store, options));
}