Skip to content

Commit 97b1eb3

Browse files
committed
add clob test
1 parent 27a62b8 commit 97b1eb3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/tests/mariaDb.cfc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)