/[svn]/linuxsampler/trunk/src/db/InstrumentsDbUtilities.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/db/InstrumentsDbUtilities.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1907 by iliev, Mon Sep 29 18:21:21 2008 UTC revision 1908 by persson, Mon Jun 1 18:50:06 2009 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2007, 2008 Grigor Iliev                                 *   *   Copyright (C) 2007 - 2009 Grigor Iliev                                *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 152  namespace LinuxSampler { Line 152  namespace LinuxSampler {
152          if (Pattern.length() == 0) return;          if (Pattern.length() == 0) return;
153    
154          if (IsRegex(Pattern)) {          if (IsRegex(Pattern)) {
155    #ifndef WIN32
156              Sql << " AND " << Col << " regexp ?";              Sql << " AND " << Col << " regexp ?";
157    #else
158                for (int i = 0; i < Pattern.length(); i++) {
159                    if (Pattern.at(i) == '?') Pattern.at(i) = '_';
160                    else if (Pattern.at(i) == '*') Pattern.at(i) = '%';
161                }
162                Sql << " AND " << Col << " LIKE ?";
163    #endif
164              Params.push_back(Pattern);              Params.push_back(Pattern);
165              return;              return;
166          }          }

Legend:
Removed from v.1907  
changed lines
  Added in v.1908

  ViewVC Help
Powered by ViewVC