큐브리드2009/07/13 23:53
CLASS

설명
CLASS 명령은 테이블(클래스) 또는 뷰(가상클래스)의 속성, 제약조건 등의 스키마 정보를 확인하는 데 사용된다.


구문
CLASS 명령의 문법은 다음과 같다. 볼드체는 필수 입력 정보이다.

task:class
token:{cmserver 인증후 받은 token 문자열}

dbname:{조회할 데이터베이스명}
classname: {조회할 테이블 및 뷰 명}


예제
demodb 데이터베이스 백업 정보를 조회하는 예제이다.

--request--
task:class
token:4504b930fc1be99bcd937c8bdb7f87608375a218acf865b0918e032c738469ff7926f07dd201b6aa
dbname:demodb
classname:code

--response--
task:class
status:success
note:none
open:classinfo
dbname:demodb
classname:code
type:user
owner:PUBLIC
virtual:normal
open:attribute
name:s_name
type:character(1)
inherit:code
indexed:n
notnull:n
shared:n
unique:n
default:
close:attribute
open:attribute
name:f_name
type:character varying(6)
inherit:code
indexed:n
notnull:n
shared:n
unique:n
default:
close:attribute
close:classinfo

--response:fail(존재하지 않는 데이터베이스)--
task:class
status:failure
note:Failed to connect to database server, 'notexist', on the following host(s): localhost

--response:fail(존재하지 않는 테이블 또는 뷰)--
task:class
status:failure
note:Unknown class "notexisttbl".

--response:fail(데이터베이스명 또는 테이블/뷰명 입력 누락)--
task:class
status:failure
note:Function called with missing or invalid arguments.
저작자 표시 비영리 변경 금지
Posted by 종이비행기