<feed xmlns='http://www.w3.org/2005/Atom'>
<title>aliens/scuttle/src/SemanticScuttle/db/sqlite.php, branch oni</title>
<subtitle>My fork of SemanticScuttle</subtitle>
<id>https://code.ryuslash.org/aliens/scuttle/atom?h=oni</id>
<link rel='self' href='https://code.ryuslash.org/aliens/scuttle/atom?h=oni'/>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/scuttle/'/>
<updated>2024-06-11T21:45:50Z</updated>
<entry>
<title>Support reentrant calls to ‘sql_db-&gt;sql_transaction’ for SQLite</title>
<updated>2024-06-11T21:45:50Z</updated>
<author>
<name>Tom Willemse</name>
</author>
<published>2024-06-11T21:45:50Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/scuttle/commit/?id=b76f3afb27702c990275708c2ea0d432f35c6df1'/>
<id>urn:sha1:b76f3afb27702c990275708c2ea0d432f35c6df1</id>
<content type='text'>
SQLite transactions don't appear to be reentrant. So calling ‘BEGIN’ and then
again ‘BEGIN’ is an error if there is no ‘COMMIT’ or ‘ROLLBACK’ in between.

In order to pretend like this works (it doesn't) I keep track of the level of
the number of transactions that have been created and only call the actual
‘BEGIN’ on the first call and ‘COMMIT’ and ‘ROLLBACK’ on the final one.

This does mean that if any part of the code forgets to do a commit or rollback
for any reason it'll maintain the transaction indefinitely.

I want to change it to explicitly fail if this is attempted, but MySQL/MariaDB
doesn't seem to have any problem with calling ‘BEGIN’ and ‘COMMIT’/‘ROLLBACK’ as
many times as one wants.
</content>
</entry>
<entry>
<title>Use ‘exec’ instead of ‘query’ for transaction commands in sqlite</title>
<updated>2024-06-11T07:00:38Z</updated>
<author>
<name>Tom Willemse</name>
</author>
<published>2024-06-11T07:00:38Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/scuttle/commit/?id=dec3464bffa14245b2cea076f2aac3a55283230d'/>
<id>urn:sha1:dec3464bffa14245b2cea076f2aac3a55283230d</id>
<content type='text'>
The ‘query’ method will try and return a ‘SQLite3Result’ object, which will be
meaningless because it won't contain any fetched data. The ‘exec’ method instead
returns a boolean indicating the success or failure of the query.
</content>
</entry>
<entry>
<title>Fix using SQLite as a database engine</title>
<updated>2024-06-11T06:38:09Z</updated>
<author>
<name>Tom Willemse</name>
</author>
<published>2024-06-11T06:38:09Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/scuttle/commit/?id=eb81d7b851f51ab5919be78493737ef2abf49aab'/>
<id>urn:sha1:eb81d7b851f51ab5919be78493737ef2abf49aab</id>
<content type='text'>
- The ‘sqlite_*’ functions don't exist anymore in PHP 8. They have been replaced
  with several ‘SQLite3*’ classes.

- There are some differences between MySQL and SQLite queries that showed up
  while doing this work. These differences have been pushed into a QueryBuilder
  class so that the other database engines don't have to be modified. This is
  done in an ad-hoc basis for now, just to get things working.

- SQLite doesn't support the ‘!’ negation operator used as ‘!ISNULL(...)’,
  instead I use ‘IIF(...)’.

- SQLite doesn't support a ‘LEFT(...)’ function, instead I use ‘SUBSTRING(...,
  0, ...)’.

- The SQLite3 module doesn't provide a connection identifier, instead you use an
  object that represents the connection.

- SQLite doesn't support the ‘ALL’ keyword (or at least doesn't support it in
  the same way MySQL does). Instead of ‘&lt;&gt; ALL &lt;subquery&gt;’ I use ‘NOT IN
  &lt;subquery&gt;’.

- The ‘SQLite3*’ classes don't provide any way to determine how many rows have
  been returned without iterating through all of them, so any place that tries
  to figure out the rows beforehand just doesn't anymore.

- All the database engine classes require a ‘QueryBuilder’ instance. The sqlite
  one uses a specialized one. I can't test most of these database engines, so
  I'm focusing on SQLite and MySQL/MariaDB for now.
</content>
</entry>
<entry>
<title>PHP 8 modifications</title>
<updated>2023-12-21T00:40:53Z</updated>
<author>
<name>buckaroo-labs</name>
</author>
<published>2023-12-21T00:40:53Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/scuttle/commit/?id=ec115471e4c06fd8448816866311efb432c6bc4f'/>
<id>urn:sha1:ec115471e4c06fd8448816866311efb432c6bc4f</id>
<content type='text'>
modifications to avoid "Deprecated" warnings in sql_connect function</content>
</entry>
<entry>
<title>move files to new locations</title>
<updated>2009-10-03T14:00:33Z</updated>
<author>
<name>cweiske</name>
</author>
<published>2009-10-03T14:00:33Z</published>
<link rel='alternate' type='text/html' href='https://code.ryuslash.org/aliens/scuttle/commit/?id=29422fa55379aa61a61019b832c83dab6d450264'/>
<id>urn:sha1:29422fa55379aa61a61019b832c83dab6d450264</id>
<content type='text'>
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@386 b3834d28-1941-0410-a4f8-b48e95affb8f
</content>
</entry>
</feed>
