praeclarum / praeclarum/sqlite-net

[Sqlite-net-chiper] Alias issue

Open
#855 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.5k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I have encountered an issue using sqlite-net-chiper.

This is my scenario:

  1. Create a table.
  2. Using PRAGMA table_info it returns the correct fields name.
  3. Create a second table.
  4. Using PRAGMA table_info on the second table, it returns the correct fields name.
  5. Create a third table.
  6. Using PRAGMA table_info on the third table, it returns incorrect fields name.

The name returned in the last PRAGMA table_info are like tableName.tableField, so in the next query, if I try to access at the value of the tableField the application returns an error because it can't find the tableField column (I should access it using tableName.tableField).

This issue isn't present in the sqlite-net package without chiper.

Here a sample.

Regards.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked TestAliasSqlite.zip reproduction and compare sqlite-net-chiper with sqlite-net without encryption. Inspect the PRAGMA table_info results after creating the third table and trace why field names become table-qualified. Done means the third table reports usable field names and subsequent queries can access the table fields as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sqlite
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.