parameters: (connection)
return_statement: return None
docstring: Returns a GrtVersion instance containing information about the server version.
docstring_summary: Returns a GrtVersion instance containing information about the server version.
docstring_tokens: Returns a GrtVersion instance containing information about the server version .
function: def getServerVersion(connection):
      """Returns a GrtVersion instance containing information about the server version."""
      result = execute_query(connection, "SHOW VARIABLES LIKE 'version'")
      if result and result.nextRow():
          import re
          p = re.match("([0-9]*)\.([0-9]*)\.([0-9]*)", result.stringByIndex(2))
          if p and p.groups():
              version = grt.classes.GrtVersion()
              ver_parts = [int(n) for n in p.groups()] + [0]*4
              version.majorNumber, version.minorNumber, version.releaseNumber, version.buildNumber = ver_parts[:4]
              return version
      return None
function_tokens: def getServerVersion ( connection ) : result = execute_query ( connection , "SHOW VARIABLES LIKE 'version'" ) if result and result . nextRow ( ) : import re p = re . match ( "([0-9]*)\.([0-9]*)\.([0-9]*)" , result . stringByIndex ( 2 ) ) if p and p . groups ( ) : version = grt . classes . GrtVersion ( ) ver_parts = [ int ( n ) for n in p . groups ( ) ] + [ 0 ] * 4 version . majorNumber , version . minorNumber , version . releaseNumber , version . buildNumber = ver_parts [ : 4 ] return version return None