TableName constructor

TableName(
  1. String name, {
  2. bool schemaSupported = true,
})

Create a TableName. If schemas are not supported , set schemaSupported to false].

Implementation

TableName(this.name, {bool schemaSupported = true}) {
  if (schemaSupported) {
    if (name.contains(".")) {
      var split = name.split(".");
      name = split[1];
      _schema = split[0];
    }
  } else {
    _schema = null;
  }

  if (_schema != null) {
    fixedName = _schema! + "." + DbsUtilities.fixWithQuotes(name);
    bracketName = _schema! + "." + DbsUtilities.fixWithBrackets(name);
    fixedDoubleName = _schema! + "." + DbsUtilities.fixWithDoubleQuotes(name);
  } else {
    fixedName = DbsUtilities.fixWithQuotes(name);
    bracketName = DbsUtilities.fixWithBrackets(name);
    fixedDoubleName = DbsUtilities.fixWithDoubleQuotes(name);
  }
}