---
title: "setValue(_:forPragmaNamed:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nspersistentstoredescription/setvalue(_:forpragmanamed:)"
---

# setValue(_:forPragmaNamed:)

Allows you to set pragmas for the SQLite store.

## Declaration

```swift
func setValue(_ value: NSObject?, forPragmaNamed name: String)
```

## Parameters

- `value`: The value of the pragma to be set.
- `name`: The name of the pragma to be set.

## Discussion

Discussion Pragma options are for SQLite stores only. All pragma values must be specified as NSStringobjects. The fullfsync and synchronous pragmas control the tradeoff between write performance (write to disk speed and cache utilization) and durability (data loss/corruption sensitivity to power interruption). For more information on pragma settings, see http://sqlite.org/pragma.html.

## See Also

### Configuring a Persistent Store Description

- [url](coredata/nspersistentstoredescription/url.md)
- [configuration](coredata/nspersistentstoredescription/configuration.md)
- [timeout](coredata/nspersistentstoredescription/timeout.md)
- [type](coredata/nspersistentstoredescription/type.md)
- [isReadOnly](coredata/nspersistentstoredescription/isreadonly.md)
- [shouldAddStoreAsynchronously](coredata/nspersistentstoredescription/shouldaddstoreasynchronously.md)
- [shouldInferMappingModelAutomatically](coredata/nspersistentstoredescription/shouldinfermappingmodelautomatically.md)
- [shouldMigrateStoreAutomatically](coredata/nspersistentstoredescription/shouldmigratestoreautomatically.md)
- [setOption(_:forKey:)](coredata/nspersistentstoredescription/setoption(_:forkey:).md)
