MCPcopy
hub / github.com/jOOQ/jOOQ / initColumns

Method initColumns

jOOQ/src/main/java/org/jooq/impl/MetaImpl.java:1878–2098  ·  view source on GitHub ↗
(Result<Record> columns)

Source from the content-addressed store, hash-verified

1876 }
1877
1878 @SuppressWarnings({ "rawtypes", "unchecked" })
1879 private final void initColumns(Result<Record> columns) {
1880 boolean hasAutoIncrement = false;
1881
1882 for (Record column : columns) {
1883 String columnName = column.get(3, String.class); // COLUMN_NAME
1884 String typeName = column.get(5, String.class); // TYPE_NAME
1885 int precision = column.get(6, int.class); // COLUMN_SIZE
1886 int scale = column.get(8, int.class); // DECIMAL_DIGITS
1887 int nullable = column.get(10, int.class); // NULLABLE
1888 String remarks = column.get(11, String.class); // REMARKS
1889 String defaultValue = column.get(12, String.class); // COLUMN_DEF
1890
1891 // [#10817] Some dialects may produce NULL (the expression) rather than NULL (the value)
1892 if ("null".equalsIgnoreCase(defaultValue))
1893 defaultValue = null;
1894
1895 boolean isAutoIncrement = column.size() >= 23
1896 ? column.get(22, boolean.class) // IS_AUTOINCREMENT
1897 : false;
1898
1899 GenerationOption o = null;
1900 boolean isGenerated = column.size() >= 24 // IS_GENERATEDCOLUMN
1901 ? column.get(23, boolean.class)
1902 : false;
1903
1904 // [#16973] Some JDBC drivers cannot be trusted to produce a type name here
1905 if (typeName == null)
1906 typeName = SQLDataType.OTHER.getName();
1907
1908 switch (family()) {
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935

Callers 1

MetaTableMethod · 0.95

Calls 15

getDataTypeMethod · 0.95
identityModeMethod · 0.95
nullableMethod · 0.95
isEmptyMethod · 0.95
fieldMethod · 0.95
parserMethod · 0.95
inlineMethod · 0.95
generatedAlwaysAsMethod · 0.95
default_Method · 0.95
matcherMethod · 0.80

Tested by

no test coverage detected