diff options
author | Travis A. Everett <travis.a.everett@gmail.com> | 2020-05-05 14:07:15 (GMT) |
---|---|---|
committer | Travis A. Everett <travis.a.everett@gmail.com> | 2020-05-05 14:07:15 (GMT) |
commit | ee9a4679ae630f8f808619c5450f6b2f5a860994 (patch) | |
tree | 59359d52b65c97f765de08832ead1262cc042a94 /src | |
parent | 2a6f9d50d606c59e86fe99e4304f056fd7f1032c (diff) | |
download | Doxygen-ee9a4679ae630f8f808619c5450f6b2f5a860994.zip Doxygen-ee9a4679ae630f8f808619c5450f6b2f5a860994.tar.gz Doxygen-ee9a4679ae630f8f808619c5450f6b2f5a860994.tar.bz2 |
sqlite: flip _static default in bindTextParameter
Diffstat (limited to 'src')
-rw-r--r-- | src/sqlite3gen.cpp | 125 |
1 files changed, 62 insertions, 63 deletions
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index e161bc4..b7898f5 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -854,7 +854,7 @@ class TextGeneratorSqlite3Impl : public TextGeneratorIntf }; -static bool bindTextParameter(SqlStmt &s,const char *name,const char *value, bool _static=TRUE) +static bool bindTextParameter(SqlStmt &s,const char *name,const char *value, bool _static=FALSE) { int idx = sqlite3_bind_parameter_index(s.stmt, name); if (idx==0) { @@ -909,11 +909,11 @@ static int insertPath(QCString name, bool local=TRUE, bool found=TRUE, int type= name = stripFromPath(name); - bindTextParameter(path_select,":name",name.data(),FALSE); + bindTextParameter(path_select,":name",name.data()); rowid=step(path_select,TRUE,TRUE); if (rowid==0) { - bindTextParameter(path_insert,":name",name.data(),FALSE); + bindTextParameter(path_insert,":name",name.data()); bindIntParameter(path_insert,":type",type); bindIntParameter(path_insert,":local",local?1:0); bindIntParameter(path_insert,":found",found?1:0); @@ -924,13 +924,13 @@ static int insertPath(QCString name, bool local=TRUE, bool found=TRUE, int type= static void recordMetadata() { - bindTextParameter(meta_insert,":doxygen_version",getFullVersion(),FALSE); - bindTextParameter(meta_insert,":schema_version","0.2.0"); //TODO: this should be a constant somewhere; not sure where - bindTextParameter(meta_insert,":generated_at",dateToString(TRUE), FALSE); - bindTextParameter(meta_insert,":generated_on",dateToString(FALSE), FALSE); - bindTextParameter(meta_insert,":project_name",Config_getString(PROJECT_NAME),FALSE); - bindTextParameter(meta_insert,":project_number",Config_getString(PROJECT_NUMBER),FALSE); - bindTextParameter(meta_insert,":project_brief",Config_getString(PROJECT_BRIEF),FALSE); + bindTextParameter(meta_insert,":doxygen_version",getFullVersion()); + bindTextParameter(meta_insert,":schema_version","0.2.0",TRUE); //TODO: this should be a constant somewhere; not sure where + bindTextParameter(meta_insert,":generated_at",dateToString(TRUE)); + bindTextParameter(meta_insert,":generated_on",dateToString(FALSE)); + bindTextParameter(meta_insert,":project_name",Config_getString(PROJECT_NAME)); + bindTextParameter(meta_insert,":project_number",Config_getString(PROJECT_NUMBER)); + bindTextParameter(meta_insert,":project_brief",Config_getString(PROJECT_BRIEF)); step(meta_insert); } @@ -948,11 +948,11 @@ struct Refid insertRefid(const char *refid) ret.created = FALSE; if (refid==0) return ret; - bindTextParameter(refid_select,":refid",refid,FALSE); + bindTextParameter(refid_select,":refid",refid); ret.rowid=step(refid_select,TRUE,TRUE); if (ret.rowid==0) { - bindTextParameter(refid_insert,":refid",refid,FALSE); + bindTextParameter(refid_insert,":refid",refid); ret.rowid=step(refid_insert,TRUE); ret.created = TRUE; } @@ -996,7 +996,7 @@ static bool insertMemberReference(struct Refid src_refid, struct Refid dst_refid } else { - bindTextParameter(xrefs_insert,":context",context,FALSE); + bindTextParameter(xrefs_insert,":context",context); } step(xrefs_insert); @@ -1036,8 +1036,8 @@ static void insertMemberFunctionParams(int memberdef_id, const MemberDef *md, co if (!a.attrib.isEmpty()) { - bindTextParameter(param_select,":attributes",a.attrib,FALSE); - bindTextParameter(param_insert,":attributes",a.attrib,FALSE); + bindTextParameter(param_select,":attributes",a.attrib); + bindTextParameter(param_insert,":attributes",a.attrib); } if (!a.type.isEmpty()) { @@ -1054,30 +1054,30 @@ static void insertMemberFunctionParams(int memberdef_id, const MemberDef *md, co insertMemberReference(src_refid,dst_refid, "argument"); ++li; } - bindTextParameter(param_select,":type",a.type,FALSE); - bindTextParameter(param_insert,":type",a.type,FALSE); + bindTextParameter(param_select,":type",a.type); + bindTextParameter(param_insert,":type",a.type); } if (!a.name.isEmpty()) { - bindTextParameter(param_select,":declname",a.name,FALSE); - bindTextParameter(param_insert,":declname",a.name,FALSE); + bindTextParameter(param_select,":declname",a.name); + bindTextParameter(param_insert,":declname",a.name); } if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name) { - bindTextParameter(param_select,":defname",defArg->name,FALSE); - bindTextParameter(param_insert,":defname",defArg->name,FALSE); + bindTextParameter(param_select,":defname",defArg->name); + bindTextParameter(param_insert,":defname",defArg->name); } if (!a.array.isEmpty()) { - bindTextParameter(param_select,":array",a.array,FALSE); - bindTextParameter(param_insert,":array",a.array,FALSE); + bindTextParameter(param_select,":array",a.array); + bindTextParameter(param_insert,":array",a.array); } if (!a.defval.isEmpty()) { StringList l; linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,a.defval); - bindTextParameter(param_select,":defval",a.defval,FALSE); - bindTextParameter(param_insert,":defval",a.defval,FALSE); + bindTextParameter(param_select,":defval",a.defval); + bindTextParameter(param_insert,":defval",a.defval); } int param_id=step(param_select,TRUE,TRUE); @@ -1107,7 +1107,7 @@ static void insertMemberDefineParams(int memberdef_id,const MemberDef *md, const { for (const Argument &a : md->argumentList()) { - bindTextParameter(param_insert,":defname",a.type,FALSE); + bindTextParameter(param_insert,":defname",a.type); int param_id=step(param_insert,TRUE); if (param_id==-1) { continue; @@ -1383,21 +1383,21 @@ static void writeTemplateArgumentList(const ArgumentList &al, if (!a.type.isEmpty()) { //#warning linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.type); - bindTextParameter(param_select,":type",a.type,FALSE); - bindTextParameter(param_insert,":type",a.type,FALSE); + bindTextParameter(param_select,":type",a.type); + bindTextParameter(param_insert,":type",a.type); } if (!a.name.isEmpty()) { - bindTextParameter(param_select,":declname",a.name,FALSE); - bindTextParameter(param_insert,":declname",a.name,FALSE); - bindTextParameter(param_select,":defname",a.name,FALSE); - bindTextParameter(param_insert,":defname",a.name,FALSE); + bindTextParameter(param_select,":declname",a.name); + bindTextParameter(param_insert,":declname",a.name); + bindTextParameter(param_select,":defname",a.name); + bindTextParameter(param_insert,":defname",a.name); } if (!a.defval.isEmpty()) { //#warning linkifyText(TextGeneratorXMLImpl(t),scope,fileScope,0,a.defval); - bindTextParameter(param_select,":defval",a.defval,FALSE); - bindTextParameter(param_insert,":defval",a.defval,FALSE); + bindTextParameter(param_select,":defval",a.defval); + bindTextParameter(param_insert,":defval",a.defval); } if (!step(param_select,TRUE,TRUE)) step(param_insert); @@ -1452,8 +1452,7 @@ static void getSQLDesc(SqlStmt &s,const char *col,const char *value,const Defini value, def->docFile(), def->docLine() - ), - FALSE + ) ); } //////////////////////////////////////////// @@ -1646,7 +1645,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref } bindIntParameter(memberdef_insert,":rowid", refid.rowid); - bindTextParameter(memberdef_insert,":kind",md->memberTypeName(),FALSE); + bindTextParameter(memberdef_insert,":kind",md->memberTypeName()); bindIntParameter(memberdef_insert,":prot",md->protection()); bindIntParameter(memberdef_insert,":static",md->isStatic()); @@ -1699,7 +1698,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref { QCString bitfield = md->bitfieldString(); if (bitfield.at(0)==':') bitfield=bitfield.mid(1); - bindTextParameter(memberdef_insert,":bitfield",bitfield.stripWhiteSpace(),FALSE); + bindTextParameter(memberdef_insert,":bitfield",bitfield.stripWhiteSpace()); } } else if (md->memberType() == MemberType_Property) @@ -1725,8 +1724,8 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref bindIntParameter(memberdef_insert,":accessor",accessor); } - bindTextParameter(memberdef_insert,":read",md->getReadAccessor(),FALSE); - bindTextParameter(memberdef_insert,":write",md->getWriteAccessor(),FALSE); + bindTextParameter(memberdef_insert,":read",md->getReadAccessor()); + bindTextParameter(memberdef_insert,":write",md->getWriteAccessor()); } else if (md->memberType() == MemberType_Event) { @@ -1762,26 +1761,26 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref linkifyText(TextGeneratorSqlite3Impl(l), def, md->getBodyDef(),md,typeStr); if (typeStr) { - bindTextParameter(memberdef_insert,":type",typeStr,FALSE); + bindTextParameter(memberdef_insert,":type",typeStr); } if (md->definition()) { - bindTextParameter(memberdef_insert,":definition",md->definition(),FALSE); + bindTextParameter(memberdef_insert,":definition",md->definition()); } if (md->argsString()) { - bindTextParameter(memberdef_insert,":argsstring",md->argsString(),FALSE); + bindTextParameter(memberdef_insert,":argsstring",md->argsString()); } } - bindTextParameter(memberdef_insert,":name",md->name(),FALSE); + bindTextParameter(memberdef_insert,":name",md->name()); // Extract references from initializer if (md->hasMultiLineInitializer() || md->hasOneLineInitializer()) { - bindTextParameter(memberdef_insert,":initializer",md->initializer(),FALSE); + bindTextParameter(memberdef_insert,":initializer",md->initializer()); StringList l; linkifyText(TextGeneratorSqlite3Impl(l),def,md->getBodyDef(),md,md->initializer()); @@ -1807,7 +1806,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref if ( md->getScopeString() ) { - bindTextParameter(memberdef_insert,":scope",md->getScopeString(),FALSE); + bindTextParameter(memberdef_insert,":scope",md->getScopeString()); } // +Brief, detailed and inbody description @@ -1951,9 +1950,9 @@ static void generateSqlite3ForClass(const ClassDef *cd) bindIntParameter(compounddef_insert,":rowid", refid.rowid); - bindTextParameter(compounddef_insert,":name",cd->name(),FALSE); - bindTextParameter(compounddef_insert,":title",cd->title(), FALSE); - bindTextParameter(compounddef_insert,":kind",cd->compoundTypeString(),FALSE); + bindTextParameter(compounddef_insert,":name",cd->name()); + bindTextParameter(compounddef_insert,":title",cd->title()); + bindTextParameter(compounddef_insert,":kind",cd->compoundTypeString()); bindIntParameter(compounddef_insert,":prot",cd->protection()); int file_id = insertPath(cd->getDefFileName()); @@ -2098,9 +2097,9 @@ static void generateSqlite3ForNamespace(const NamespaceDef *nd) if(!refid.created && compounddefExists(refid)){return;} bindIntParameter(compounddef_insert,":rowid", refid.rowid); - bindTextParameter(compounddef_insert,":name",nd->name(),FALSE); - bindTextParameter(compounddef_insert,":title",nd->title(), FALSE); - bindTextParameter(compounddef_insert,":kind","namespace",FALSE); + bindTextParameter(compounddef_insert,":name",nd->name()); + bindTextParameter(compounddef_insert,":title",nd->title()); + bindTextParameter(compounddef_insert,":kind","namespace"); int file_id = insertPath(nd->getDefFileName()); bindIntParameter(compounddef_insert,":file_id",file_id); @@ -2165,9 +2164,9 @@ static void generateSqlite3ForFile(const FileDef *fd) if(!refid.created && compounddefExists(refid)){return;} bindIntParameter(compounddef_insert,":rowid", refid.rowid); - bindTextParameter(compounddef_insert,":name",fd->name(),FALSE); - bindTextParameter(compounddef_insert,":title",fd->title(),FALSE); - bindTextParameter(compounddef_insert,":kind","file",FALSE); + bindTextParameter(compounddef_insert,":name",fd->name()); + bindTextParameter(compounddef_insert,":title",fd->title()); + bindTextParameter(compounddef_insert,":kind","file"); int file_id = insertPath(fd->getDefFileName()); bindIntParameter(compounddef_insert,":file_id",file_id); @@ -2332,9 +2331,9 @@ static void generateSqlite3ForGroup(const GroupDef *gd) if(!refid.created && compounddefExists(refid)){return;} bindIntParameter(compounddef_insert,":rowid", refid.rowid); - bindTextParameter(compounddef_insert,":name",gd->name(),FALSE); - bindTextParameter(compounddef_insert,":title",gd->groupTitle(), FALSE); - bindTextParameter(compounddef_insert,":kind","group",FALSE); + bindTextParameter(compounddef_insert,":name",gd->name()); + bindTextParameter(compounddef_insert,":title",gd->groupTitle()); + bindTextParameter(compounddef_insert,":kind","group"); int file_id = insertPath(gd->getDefFileName()); bindIntParameter(compounddef_insert,":file_id",file_id); @@ -2399,8 +2398,8 @@ static void generateSqlite3ForDir(const DirDef *dd) if(!refid.created && compounddefExists(refid)){return;} bindIntParameter(compounddef_insert,":rowid", refid.rowid); - bindTextParameter(compounddef_insert,":name",dd->displayName(),FALSE); - bindTextParameter(compounddef_insert,":kind","dir",FALSE); + bindTextParameter(compounddef_insert,":name",dd->displayName()); + bindTextParameter(compounddef_insert,":kind","dir"); int file_id = insertPath(dd->getDefFileName(),TRUE,TRUE,2); bindIntParameter(compounddef_insert,":file_id",file_id); @@ -2457,7 +2456,7 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample) bindIntParameter(compounddef_insert,":rowid",refid.rowid); // + name - bindTextParameter(compounddef_insert,":name",pd->name(),FALSE); + bindTextParameter(compounddef_insert,":name",pd->name()); QCString title; if (pd==Doxygen::mainPage) // main page is special @@ -2483,9 +2482,9 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample) } // + title - bindTextParameter(compounddef_insert,":title",title,FALSE); + bindTextParameter(compounddef_insert,":title",title); - bindTextParameter(compounddef_insert,":kind", isExample ? "example" : "page"); + bindTextParameter(compounddef_insert,":kind", isExample ? "example" : "page",TRUE); int file_id = insertPath(pd->getDefFileName()); |