Create the initial statement object

Review Request #3833 — Created Feb. 11, 2025 and submitted

Information

seagull/seagull
default

Reviewers

This is a basic GInitable that will verify that the statement is valid and
that only one statement was given. This does not yet implement anything for
bindings, steping through results, or getting said results.

Ran the tests under valgrind and called in the turtles for the rest.

Summary ID
Create the initial statement object
This is a basic GInitable that will verify that the statement is valid and that only one statement was given. This does not yet implement anything for bindings, steping through results, or getting said results.
727c8bacf4ee14ebf35f56cfd5f9cbfef5b8cda2
Description From Last Updated

This can be called more than once, in which case the existing statement->statement will leak. We should check statement->statement at …

QuLogicQuLogic

Is this different from statement->sql?

QuLogicQuLogic

Should we test this double-init?

QuLogicQuLogic
QuLogic
  1. 
      
  2. seagull/seagullstatement.c (Diff revision 1)
     
     
     
    Show all issues

    This can be called more than once, in which case the existing statement->statement will leak.

    We should check statement->statement at the start, and either fail or return early.

  3. seagull/seagullstatement.c (Diff revision 1)
     
     
    Show all issues

    Is this different from statement->sql?

    1. It shouldn't be. We can go either way, but once we add binding I'm going to add a get_expanded_sql that will call sqlite3_expanded_sql https://www.sqlite.org/c3ref/expanded_sql.html.

      We store the sql because we need it for the initable to work, but i wasn't sure if sqlite will do any normalization or trimming of the sql which is anyone reason I called into the library. but I can add a unit test to check that real quick.

  4. 
      
grim
QuLogic
  1. 
      
  2. seagull/seagullstatement.c (Diff revision 2)
     
     
    Show all issues

    Should we test this double-init?

  3. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed