Tabnine Logo
Field.getColumnLabel
Code IndexAdd Tabnine to your IDE (free)

How to use
getColumnLabel
method
in
org.postgresql.core.Field

Best Java code snippets using org.postgresql.core.Field.getColumnLabel (Showing top 8 results out of 315)

origin: org.postgresql/postgresql

public static Map<String, Integer> createColumnNameIndexMap(Field[] fields,
  boolean isSanitiserDisabled) {
 Map<String, Integer> columnNameIndexMap = new HashMap<String, Integer>(fields.length * 2);
 // The JDBC spec says when you have duplicate columns names,
 // the first one should be returned. So load the map in
 // reverse order so the first ones will overwrite later ones.
 for (int i = fields.length - 1; i >= 0; i--) {
  String columnLabel = fields[i].getColumnLabel();
  if (isSanitiserDisabled) {
   columnNameIndexMap.put(columnLabel, i + 1);
  } else {
   columnNameIndexMap.put(columnLabel.toLowerCase(Locale.US), i + 1);
  }
 }
 return columnNameIndexMap;
}
origin: org.postgresql/postgresql

public String getColumnLabel(int column) throws SQLException {
 Field field = getField(column);
 return field.getColumnLabel();
}
origin: postgresql/postgresql

public String getColumnLabel(int column) throws SQLException
{
  Field field = getField(column);
  return field.getColumnLabel();
}
origin: postgresql/postgresql

private int findColumnIndex(String columnName)
{
  if (columnNameIndexMap == null)
  {
    columnNameIndexMap = new HashMap(fields.length * 2);
    // The JDBC spec says when you have duplicate columns names,
    // the first one should be returned.  So load the map in
    // reverse order so the first ones will overwrite later ones.
    for (int i = fields.length - 1; i >= 0; i--)
    {
      columnNameIndexMap.put(fields[i].getColumnLabel().toLowerCase(Locale.US), new Integer(i + 1));
    }
  }
  Integer index = (Integer)columnNameIndexMap.get(columnName);
  if (index != null)
  {
    return index.intValue();
  }
  index = (Integer)columnNameIndexMap.get(columnName.toLowerCase(Locale.US));
  if (index != null)
  {
    columnNameIndexMap.put(columnName, index);
    return index.intValue();
  }
  return 0;
}
origin: org.ancoron.postgresql/org.postgresql

public String getColumnLabel(int column) throws SQLException
{
  Field field = getField(column);
  return field.getColumnLabel();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

public String getColumnLabel(int column) throws SQLException
{
  Field field = getField(column);
  return field.getColumnLabel();
}
origin: org.ancoron.postgresql/org.postgresql.osgi

private int findColumnIndex(String columnName)
{
  if (columnNameIndexMap == null)
  {
    columnNameIndexMap = new HashMap(fields.length * 2);
    // The JDBC spec says when you have duplicate columns names,
    // the first one should be returned.  So load the map in
    // reverse order so the first ones will overwrite later ones.
    for (int i = fields.length - 1; i >= 0; i--)
    {
      columnNameIndexMap.put(fields[i].getColumnLabel().toLowerCase(Locale.US), new Integer(i + 1));
    }
  }
  Integer index = (Integer)columnNameIndexMap.get(columnName);
  if (index != null)
  {
    return index.intValue();
  }
  index = (Integer)columnNameIndexMap.get(columnName.toLowerCase(Locale.US));
  if (index != null)
  {
    columnNameIndexMap.put(columnName, index);
    return index.intValue();
  }
  return 0;
}
origin: org.ancoron.postgresql/org.postgresql

private int findColumnIndex(String columnName)
{
  if (columnNameIndexMap == null)
  {
    columnNameIndexMap = new HashMap(fields.length * 2);
    // The JDBC spec says when you have duplicate columns names,
    // the first one should be returned.  So load the map in
    // reverse order so the first ones will overwrite later ones.
    for (int i = fields.length - 1; i >= 0; i--)
    {
      columnNameIndexMap.put(fields[i].getColumnLabel().toLowerCase(Locale.US), new Integer(i + 1));
    }
  }
  Integer index = (Integer)columnNameIndexMap.get(columnName);
  if (index != null)
  {
    return index.intValue();
  }
  index = (Integer)columnNameIndexMap.get(columnName.toLowerCase(Locale.US));
  if (index != null)
  {
    columnNameIndexMap.put(columnName, index);
    return index.intValue();
  }
  return 0;
}
org.postgresql.coreFieldgetColumnLabel

Popular methods of Field

  • <init>
  • getFormat
  • getMod
  • getOID
  • getTableOid
  • setFormat
  • getAutoIncrement
  • getColumnName
  • getNullable
  • getPositionInTable
  • getSchemaName
  • getTableName
  • getSchemaName,
  • getTableName,
  • setAutoIncrement,
  • setColumnName,
  • setNullable,
  • setSchemaName,
  • setTableName,
  • getLength,
  • getMetadata

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now