kasei / perlrdf

Deprecated in favor of the Attean package
26 stars 25 forks source link

Indexes are never created on SQLite and mysql stores #162

Open jmfernandez opened 5 years ago

jmfernandez commented 5 years ago

When a SQLite store is initialized, indexes are never created. If you see at next code fragment:

https://github.com/kasei/perlrdf/blob/2db05bfd936ece27f44811a649050105581c8b49/RDF-Trine/lib/RDF/Trine/Store/DBI/SQLite.pm#L125-L135

$self->SUPER::init(); is called before, creating the needed tables. So, check in line 134 should be the opposite, something like:

        if ($self->_table_exists($table)) {

BTW, in the case of mysql store, init method has some messed code.

kasei commented 5 years ago

Thanks for reporting this. That does seem like an issue. I can try to commit a fix, but as you noticed, the DBI code in RDF::Trine is a bit of a mess, and not well maintained.

Development on RDF::Trine has mostly ended at this point, with most new work going on in the Attean project (which despite what seems like an accidental copy-commit, does not have a DBI storage engine). If you have any interest/ability to submit changes to this (or Attean) to improve the mysql code, I'd be more than happy to merge them.

Thanks again.