is there any way to do something like `varchar(MAX...
# exposed
e
is there any way to do something like
varchar(MAX)
for table definition? I need to insert more than 8000 chars. I’m using DSL and SQL.
c
what about
text("bla")
?
e
yea that is an option but as far as I remember,
text
is planned to be deprecated in the future version of SQL…
c
well text is for long text blocks.
t
@erica, never heard about a
text
deprecation, could you share a some links? Also, you may create your own column type:
Copy code
class VarCharMaxColumnType(collate: String? = null): StringColumnType(collate)  {
    override fun sqlType(): String = buildString {
        append("VARCHAR(MAX)")

        if (collate != null) {
            append(" COLLATE $collate")
        }
    }
}

fun varcharMax(name: String, collate: String? = null): Column<String> = registerColumn(name, VarCharMaxColumnType(collate))
e
@tapac thanks for the idea, that should do the trick. I was looking at this doc : https://docs.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?view=sql-server-2017
c
interesting. that seems to be sql server specific though