[Gravity] Delimiter for DatabaseDMLQueryBuilder

Review Request #93 — Created May 17, 2013 and discarded

dinos
Lunr
dinostheo:DatabaseDMLQueryBuilder_delimeter
lunr
Adds a delimiter to the DatabaseDMLQueryBuilder
current escape tests
  • 1
  • 0
  • 0
  • 0
  • 1
Description From Last Updated
This doesn't work because some db system use position dependent delimiters for identifiers. MSSQL for example uses the [identifier] format. ... pprkut pprkut
pprkut
  1. I think this would be better served a constants, since it's a value that will never change. Something like IDENTIFIER_DELIMITER_L and IDENTIFIER_DELIMITER_R. Note that then you have to access it over static:: and not self::
  2. src/Lunr/Gravity/Database/DatabaseDMLQueryBuilder.php (Diff revision 1)
     
     
     
     
     
     
    This doesn't work because some db system use position dependent delimiters for identifiers. MSSQL for example uses the [identifier] format. IMHO it would be cleaner to support this case already (even if we are not gonna implement it anytime soon).
    1. Well seen I tried it first but seen doesn't allow you to access the extended class constant.
      
      like this this work (replace static by self in show to compare):
      
      class Mother
      {
          const DELIMITER = 'mother';
      
          public function show()
          {
              echo static::DELIMITER;
          }
      
      }
      
      class Child extends Mother
      {
          const DELIMITER = 'child';
      }
      
      $mom = new Mother();
      
      $mom->show();
      
      $child = new Child();
      
      $child->show();
      
    2. Well seen I tried it first but "self" doesn't allow you to access the extended class constant.
      
  3. 
      
dinos
Review request changed

Status: Discarded

Change Summary:

changes related to this review are posted in http://reviews.lunr.nl/r/94/
Loading...