Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » IMHO strange Files for SQL Schema
IMHO strange Files for SQL Schema [message #6091] Mon, 30 October 2006 10:16 Go to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
SqlSchema uses imho strange files when used with linux (posix systems):
String SqlSchema::NormalFileName(int i, const char *dir, const char *name) const {
[...]
   if(dir)
      p = dir;
   else
#ifdef PLATFORM_WIN32
      p=GetFileDirectory(GetExeFilePath());
#endif
#ifdef PLATFORM_POSIX
      p=GetHomeDirectory();
#endif
[...]
   return AppendFileName(p,pfx[i]+n);
}


in case you have two apps with the same database schema only one will be created!

so I would prefer in both cases (windows and posix)
a "return ConfigFile(pfx[i]+n);" and no platformdependent code at all:
String SqlSchema::NormalFileName(int i, const char *dir, const char *name) const {
[...]
/*
   if(dir)
      p=dir
   else
#ifdef PLATFORM_WIN32
      p=GetFileDirectory(GetExeFilePath());
#endif
#ifdef PLATFORM_POSIX
      p=GetHomeDirectory();
#endif
*/
[...]
   if(dir)
      return AppendFileName(dir,pfx[i]+n);
   else 
      return ConfigFile(pfx[i+n]);
}


Bas
Re: IMHO strange Files for SQL Schema [message #6106 is a reply to message #6091] Mon, 30 October 2006 21:56 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Good idea. In U++ now Wink

Mirek
Previous Topic: Schema File
Next Topic: plugin/SQlite still wrong naming for linux
Goto Forum:
  


Current Time: Sun Apr 28 23:32:40 CEST 2024

Total time taken to generate the page: 0.07407 seconds