@@ -265,6 +265,22 @@ public static void setBinary(PreparedStatement preparedStatement, int parameterI
265
265
}
266
266
}
267
267
268
+ public static void setBinaryInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
269
+ if (null == inputStream ) {
270
+ preparedStatement .setNull (parameterIndex , Types .BINARY );
271
+ } else {
272
+ preparedStatement .setBinaryStream (parameterIndex , inputStream );
273
+ }
274
+ }
275
+
276
+ public static void setVarbinaryInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
277
+ if (null == inputStream ) {
278
+ preparedStatement .setNull (parameterIndex , Types .BINARY );
279
+ } else {
280
+ preparedStatement .setBinaryStream (parameterIndex , inputStream );
281
+ }
282
+ }
283
+
268
284
/**
269
285
* Set a VARBINARY datatype to a prepared statement with the value of the passed
270
286
* in String, or the correct SQL null type if null
@@ -785,6 +801,14 @@ public static void setBlobInputStream(PreparedStatement preparedStatement, int p
785
801
}
786
802
}
787
803
804
+ public static void setMediumblobInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
805
+ if (null == inputStream ) {
806
+ preparedStatement .setNull (parameterIndex , Types .BLOB );
807
+ } else {
808
+ preparedStatement .setBlob (parameterIndex , inputStream );
809
+ }
810
+ }
811
+
788
812
/**
789
813
* Set a BLOB datatype to a prepared statement with the value of the passed in Blob, or the correct SQL null type
790
814
* if null
@@ -839,6 +863,38 @@ public static void setLongtext(PreparedStatement preparedStatement, int paramete
839
863
}
840
864
}
841
865
866
+ public static void setLongtextInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
867
+ if (null == inputStream ) {
868
+ preparedStatement .setNull (parameterIndex , Types .BLOB );
869
+ } else {
870
+ preparedStatement .setAsciiStream (parameterIndex , inputStream );
871
+ }
872
+ }
873
+
874
+ public static void setTinytextInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
875
+ if (null == inputStream ) {
876
+ preparedStatement .setNull (parameterIndex , Types .BLOB );
877
+ } else {
878
+ preparedStatement .setAsciiStream (parameterIndex , inputStream );
879
+ }
880
+ }
881
+
882
+ public static void setTextInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
883
+ if (null == inputStream ) {
884
+ preparedStatement .setNull (parameterIndex , Types .BLOB );
885
+ } else {
886
+ preparedStatement .setAsciiStream (parameterIndex , inputStream );
887
+ }
888
+ }
889
+
890
+ public static void setMediumtextInputStream (PreparedStatement preparedStatement , int parameterIndex , InputStream inputStream ) throws SQLException {
891
+ if (null == inputStream ) {
892
+ preparedStatement .setNull (parameterIndex , Types .BLOB );
893
+ } else {
894
+ preparedStatement .setAsciiStream (parameterIndex , inputStream );
895
+ }
896
+ }
897
+
842
898
/**
843
899
* Set a Longtext datatype to a prepared statement with the value of the passed in InputStream, or the correct
844
900
* SQL null type if null
0 commit comments