Quick example showing how to use Clobs.
From the command line run sbt run
and you should see something simliar to :
[info] Running ClobExample
DEBUG slick.jdbc.JdbcBackend.statement - Preparing statement: create table "METADATAVALUE" ("TEXT_VALUE" CLOB NOT NULL,"ITEM_ID" INTEGER,"METADATA_FIELD_ID" INTEGER,"TEXT_LANG" VARCHAR,"PLACE" INTEGER,"AUTHORITY" VARCHAR,"CONFIDENCE" VARCHAR,"METADATA_VALUE_ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY)
DEBUG slick.jdbc.JdbcBackend.statement - Preparing statement: insert into "METADATAVALUE" ("TEXT_VALUE","ITEM_ID","METADATA_FIELD_ID","TEXT_LANG","PLACE","AUTHORITY","CONFIDENCE") values (?,?,?,?,?,?,?)
DEBUG slick.jdbc.JdbcBackend.statement - Preparing statement: select "METADATA_VALUE_ID", "TEXT_LANG", "CONFIDENCE", "TEXT_VALUE", "AUTHORITY", "ITEM_ID", "METADATA_FIELD_ID", "PLACE" from "METADATAVALUE"
DEBUG slick.jdbc.StatementInvoker.result - /-------------------+-----------+------------+---------------+-----------+---------+-------------------+-------\
DEBUG slick.jdbc.StatementInvoker.result - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
DEBUG slick.jdbc.StatementInvoker.result - | METADATA_VALUE_ID | TEXT_LANG | CONFIDENCE | TEXT_VALUE | AUTHORITY | ITEM_ID | METADATA_FIELD_ID | PLACE |
DEBUG slick.jdbc.StatementInvoker.result - |-------------------+-----------+------------+---------------+-----------+---------+-------------------+-------|
DEBUG slick.jdbc.StatementInvoker.result - | 1 | NULL | NULL | clob0: 'bog' | NULL | NULL | NULL | NULL |
DEBUG slick.jdbc.StatementInvoker.result - | 2 | NULL | NULL | clob1: 'cog' | NULL | NULL | NULL | NULL |
DEBUG slick.jdbc.StatementInvoker.result - | 3 | NULL | NULL | clob2: 'dog' | NULL | NULL | NULL | NULL |
DEBUG slick.jdbc.StatementInvoker.result - | 4 | NULL | NULL | clob3: 'frog' | NULL | NULL | NULL | NULL |
DEBUG slick.jdbc.StatementInvoker.result - | 5 | NULL | NULL | clob4: 'mog' | NULL | NULL | NULL | NULL |
DEBUG slick.jdbc.StatementInvoker.result - \-------------------+-----------+------------+---------------+-----------+---------+-------------------+-------/
DEBUG slick.jdbc.StatementInvoker.result - 1 more rows read (6 total)
DEBUG slick.jdbc.JdbcBackend.statement - Preparing statement: select "CONFIDENCE", "TEXT_VALUE", "METADATA_FIELD_ID", "PLACE", "TEXT_LANG", "METADATA_VALUE_ID", "AUTHORITY", "ITEM_ID" from "METADATAVALUE" where "TEXT_VALUE" = 'dog'
DEBUG slick.jdbc.StatementInvoker.result - /------------+--------------+-------------------+-------+-----------+-------------------+-----------+---------\
DEBUG slick.jdbc.StatementInvoker.result - | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
DEBUG slick.jdbc.StatementInvoker.result - | CONFIDENCE | TEXT_VALUE | METADATA_FIELD_ID | PLACE | TEXT_LANG | METADATA_VALUE_ID | AUTHORITY | ITEM_ID |
DEBUG slick.jdbc.StatementInvoker.result - |------------+--------------+-------------------+-------+-----------+-------------------+-----------+---------|
DEBUG slick.jdbc.StatementInvoker.result - | NULL | clob5: 'dog' | NULL | NULL | NULL | 3 | NULL | NULL |
DEBUG slick.jdbc.StatementInvoker.result - \------------+--------------+-------------------+-------+-----------+-------------------+-----------+---------/
ItemMetadata(bog,None,None,None,None,None,None,1)
ItemMetadata(cog,None,None,None,None,None,None,2)
ItemMetadata(dog,None,None,None,None,None,None,3)
ItemMetadata(frog,None,None,None,None,None,None,4)
ItemMetadata(mog,None,None,None,None,None,None,5)
ItemMetadata(oog,None,None,None,None,None,None,6)
id: 3
itemId: None
fieldid: None
textvalue: dog
lang: None
place: None
authority: None
confidence: None