clickhouse: added specifcNotNull dialect option

This commit is contained in:
Jan Prochazka
2024-09-11 15:41:26 +02:00
parent fb39cd1302
commit f74533b42f
11 changed files with 17 additions and 9 deletions

View File

@@ -4,9 +4,10 @@ const sql = require('./sql');
function extractDataType(dataType) {
if (!dataType) return {};
if (dataType.startsWith('Nullable(')) {
dataType = dataType.substring('Nullable('.length, dataType.length - 1);
const displayedDataType = dataType.substring('Nullable('.length, dataType.length - 1);
return {
dataType,
displayedDataType,
notNull: false,
};
}

View File

@@ -64,6 +64,7 @@ const dialect = {
dropIndex: true,
anonymousPrimaryKey: true,
createColumnWithColumnKeyword: true,
specificNotNull: true,
columnProperties: {
columnComment: true,