File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mariaDb" {
4747
4848 function afterAll (){
4949 QueryExecute ( " DROP TABLE IF EXISTS `datatypes`" )
50+ QueryExecute ( " DROP TABLE IF EXISTS `testnotes`" )
5051 }
5152
5253 function run ( testResults , testBox ){
@@ -122,6 +123,28 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mariaDb" {
122123 expect ( getClassName ( result .varcharField ) ).toBe ( " java.lang.String" )
123124 })
124125
126+ it ( " can add and retrieve a clob value correctly" , ()= > {
127+ QueryExecute (" CREATE TABLE `testnotes` (
128+ `id` INT(11) NOT NULL AUTO_INCREMENT,
129+ `notes` MEDIUMTEXT NOT NULL COLLATE utf16_bin,
130+ PRIMARY KEY (`id`) USING BTREE
131+ ) COLLATE=latin1_swedish_ci ENGINE=InnoDB
132+ " );
133+
134+ local .notes = ExtensionList ().toJson ();
135+
136+ QueryExecute (
137+ sql = " INSERT INTO `testnotes` ( notes ) VALUES ( :notes )" ,
138+ params = {
139+ notes : { value : notes , type : " clob" }
140+ }
141+ );
142+
143+ local .qry = QueryExecute (" SELECT notes from `testnotes`" );
144+
145+ expect ( qry .notes ).toBe ( notes );
146+ })
147+
125148 })
126149
127150 }
You can’t perform that action at this time.
0 commit comments