You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DataDefinitionQueryImpl.java 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. Copyright (c) 2008 Health Market Science, Inc.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package com.healthmarketscience.jackcess.impl.query;
  14. import java.util.List;
  15. import com.healthmarketscience.jackcess.query.DataDefinitionQuery;
  16. /**
  17. * Concrete Query subclass which represents a DDL query.
  18. *
  19. * @author James Ahlborn
  20. */
  21. public class DataDefinitionQueryImpl extends QueryImpl
  22. implements DataDefinitionQuery
  23. {
  24. public DataDefinitionQueryImpl(String name, List<Row> rows, int objectId,
  25. int objectFlag) {
  26. super(name, rows, objectId, objectFlag, Type.DATA_DEFINITION);
  27. }
  28. public String getDDLString() {
  29. return getTypeRow().expression;
  30. }
  31. @Override
  32. protected boolean supportsStandardClauses() {
  33. return false;
  34. }
  35. @Override
  36. protected void toSQLString(StringBuilder builder)
  37. {
  38. String ddl = getDDLString();
  39. if(ddl != null) {
  40. builder.append(ddl);
  41. }
  42. }
  43. }