mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
make the empty insert statement work in pk + not null situations
This commit is contained in:
@@ -173,10 +173,17 @@ QString Table::emptyInsertStmt() const
|
||||
foreach(FieldPtr f, m_fields) {
|
||||
if(f->notnull())
|
||||
{
|
||||
if(f->isInteger())
|
||||
vals << "0";
|
||||
if( m_primarykey.contains(f) && f->isInteger() )
|
||||
{
|
||||
vals << "NULL";
|
||||
}
|
||||
else
|
||||
vals << "''";
|
||||
{
|
||||
if(f->isInteger())
|
||||
vals << "0";
|
||||
else
|
||||
vals << "''";
|
||||
}
|
||||
}
|
||||
else
|
||||
vals << "NULL";
|
||||
|
||||
Reference in New Issue
Block a user