Source: eclairjs/sql/types/StringType.js

  1. /*
  2. * Copyright 2015 IBM Corp.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. (function () {
  17. var DataType = require(EclairJS_Globals.NAMESPACE + '/sql/types/DataType');
  18. /**
  19. * @constructor
  20. * @extends module:eclairjs/sql/types.DataType
  21. * @classdesc The data type representing String values. Please use the singleton DataTypes.StringType.
  22. * @memberof module:eclairjs/sql/types
  23. */
  24. var StringType = function(jvmObj) {
  25. DataType.call(this, jvmObj);
  26. };
  27. StringType.prototype = Object.create(DataType.prototype);
  28. StringType.prototype.constructor = StringType;
  29. /**
  30. * The default size of a value of the StringType is 4096 bytes.
  31. * @returns {integer}
  32. */
  33. StringType.prototype.defaultSize = function () {
  34. return this.getJavaObject().defaultSize();
  35. };
  36. StringType.prototype.classTag = function () {
  37. throw "not implemented by ElairJS";
  38. //return this.getJavaObject().classTag();
  39. };
  40. StringType.prototype.ordering = function () {
  41. throw "not implemented by ElairJS";
  42. //return this.getJavaObject().ordering();
  43. };
  44. StringType.prototype.tag = function () {
  45. throw "not implemented by ElairJS";
  46. //return this.getJavaObject().tag();
  47. };
  48. module.exports = StringType;
  49. })();