• Marco Bubke's avatar
    Sqlite: Add variadic bind and write functions · a41183f6
    Marco Bubke authored
    You can now write
    
    SqliteWriteStatement statement("UPDATE test SET name=?, number=?
                                    WHERE rowid=?", database);
    
    statement.write("see", 7.23, 1);
    
    and
    
    SqliteWriteStatement statement("UPDATE test SET name=@name, number=@number
                                    WHERE rowid=@id", database);
    
    statement.writeNamed("@name", "see", "@number", 7.23, "@id", 1);
    
    This is more type safe than using variants and performant too.
    
    Change-Id: Ie1ed2a6d326b956be5c4ec056214f3f5b1531f45
    Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
    a41183f6
sqlitereadwritestatement.h 2.15 KB