praeclarum / praeclarum/sqlite-net

QueryAsync stopped retreiving records

Open
#985 1 comment 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

I have a solution MVVM for Xamarin Forms. All the DB handling is done in a class. I wrote a lot of querys that were working fine until they didn't JUST IN ANDROID.

Example:

public async Task<List> GetJugadoresDeUnMatch(int esteMatch)
{

        List<JugadoresDeUnMatch> resultado = new List<JugadoresDeUnMatch>();

        string strSQL = "SELECT IdMatchJugador, " + 
            "J.IdJugador, Nombre, " +
            "(CASE WHEN IdMatchJugador IS NULL THEN 0 ELSE 1 END) as Seleccionado " +
            "FROM Jugadores J " +
            "LEFT JOIN MatchesJugadores MJ ON MJ.IdJugador = J.IdJugador AND MJ.IdMatch = " + esteMatch;

        resultado = await database.QueryAsync<JugadoresDeUnMatch>(strSQL);
        
        return resultado;

    }

Works fine in iOS and UWP, and just doesn't retreive any row if ran with Android.

Really confused !!!

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 with GetJugadoresDeUnMatch and the database.QueryAsync(strSQL) call shown in the issue, then reproduce the query on Android while comparing its SQL and data with iOS and UWP. Done means identifying why Android returns no rows and confirming that the method retrieves the expected records there.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sqlite
Domain
database, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.