PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: AlecStrong/sql-psi (kotlin)
Issue: Unable to set PRAGMA locking_mode = EXCLUSIVE;
Dialect: SQLite

failing sql:

```sql
PRAGMA locking_mode = EXCLUSIVE;
```

Hello!

I'd like to lock transactions temporarily on a SQLite database managed by SqlDelight in order to copy the database file for export without risking any corruption because of an ongoing transaction.

To do so, I want to have a function to lock it that would execute these SQL statements:
```sql
PRAGMA locking_mode = EXCLUSIVE;
BEGIN EXCLUSIVE;
```

and a function to unlock it that would execute these  SQL statements:
```sql
COMMIT;
PRAGMA locking_mode = NORMAL;
```

Note that `PRAGMA locking_mode = NORMAL;` is recognized. Only `PRAGMA locking_mode = EXCLUSIVE;` is not, where I get the following error message: `<pragma value real> expected, got 'EXCLUSIVE'`.

This limitation is unfortunate, because SqlDelight hides the database, so you need to first pave a way to be able to execute these SQL statements, and once per platform since there's no common API for that, and each platform driver comes with its own complexities.

Thanks for considering, and regardless, have a great day!
Pull request description: Closes https://github.com/AlecStrong/sql-psi/issues/274

Patch:
diff --git a/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf b/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf
index 9e426b69..4a9d3739 100644
--- a/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf
+++ b/core/src/main/kotlin/com/alecstrong/sql/psi/core/sql.bnf
@@ -310,7 +310,8 @@ pragma_stmt ::= PRAGMA [ database_name '.' ] pragma_name [ '=' pragma_value | '(
 }
 pragma_value ::= ( signed_number
                  | identifier
-                 | string_literal )
+                 | string_literal
+                 | EXCLUSIVE )
 reindex_stmt ::= REINDEX [ collation_name | [ database_name '.' ] ( table_name | index_name ) ] {
   pin = 1
 }


Test patch:
diff --git a/test-fixtures/src/main/resources/fixtures/pragmas/Test.s b/test-fixtures/src/main/resources/fixtures/pragmas/Test.s
new file mode 100644
index 00000000..9ffabd97
--- /dev/null
+++ b/test-fixtures/src/main/resources/fixtures/pragmas/Test.s
@@ -0,0 +1,1 @@
+PRAGMA locking_mode = EXCLUSIVE;
\ No newline at end of file
Repository: ResearchObject/ro-crate-py (python)
Issue: write-zip CLI command reinitializes the crate
The `write-zip` CLI command reinitializes the crate, so any changes like adding a workflow or test suite are lost.
Pull request description: Fix write-zip CLI command
Fixes #108.

Patch:
diff --git a/rocrate/cli.py b/rocrate/cli.py
index 250a448..7d8dad7 100644
--- a/rocrate/cli.py
+++ b/rocrate/cli.py
@@ -120,7 +120,7 @@ def definition(state, suite, path, engine, engine_version):
 @click.argument('dst', type=click.Path(writable=True))
 @click.pass_obj
 def write_zip(state, dst):
-    crate = ROCrate(state.crate_dir, init=True, gen_preview=False)
+    crate = ROCrate(state.crate_dir, init=False, gen_preview=False)
     crate.write_zip(dst)
 
 


Test patch:
diff --git a/test/test_cli.py b/test/test_cli.py
index 31b701d..bcfe14f 100644
--- a/test/test_cli.py
+++ b/test/test_cli.py
@@ -21,6 +21,7 @@ from click.testing import CliRunner
 
 from rocrate.cli import cli
 from rocrate.model.metadata import TESTING_EXTRA_TERMS
+from rocrate.rocrate import ROCrate
 
 
 @pytest.mark.parametrize("gen_preview,cwd", [(False, False), (False, True), (True, False), (True, True)])
@@ -137,6 +138,9 @@ def test_cli_write_zip(test_data_dir, monkeypatch, cwd):
     crate_dir = test_data_dir / "ro-crate-galaxy-sortchangecase"
     runner = CliRunner()
     assert runner.invoke(cli, ["-c", str(crate_dir), "init"]).exit_code == 0
+    wf_path = crate_dir / "sort-and-change-case.ga"
+    args = ["-c", str(crate_dir), "add", "workflow", str(wf_path)]
+    assert runner.invoke(cli, args).exit_code == 0
 
     output_zip_path = test_data_dir / "test-zip-archive.zip"
     args = []
@@ -150,3 +154,6 @@ def test_cli_write_zip(test_data_dir, monkeypatch, cwd):
     result = runner.invoke(cli, args)
     assert result.exit_code == 0
     assert output_zip_path.is_file()
+
+    crate = ROCrate(output_zip_path)
+    assert crate.mainEntity is not None