MCPcopy Index your code
hub / github.com/MapServer/MapServer / getSDEQueryInfo

Function getSDEQueryInfo

mapsde.c:898–976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898static SE_QUERYINFO getSDEQueryInfo(layerObj *layer)
899{
900 SE_QUERYINFO query_info;
901 long status;
902
903 msSDELayerInfo *sde=NULL;
904
905 if(!msSDELayerIsOpen(layer)) {
906 msSetError( MS_SDEERR,
907 "SDE layer has not been opened.",
908 "getSDEQueryInfo()");
909 return(NULL);
910 }
911
912 sde = layer->layerinfo;
913
914 /*
915 ** See http://forums.esri.com/Thread.asp?c=2&f=59&t=108929&mc=4#msgid310273
916 ** SE_queryinfo is a new SDE struct in ArcSDE 8.x that is a bit easier
917 ** (and faster) to use. HCB
918 */
919 status = SE_queryinfo_create (&query_info);
920 if(status != SE_SUCCESS) {
921 sde_error( status,
922 "getSDEQueryInfo()",
923 "SE_queryinfo_create()");
924 return(NULL);
925 }
926
927 /* set the tables -- just one at this point */
928 status = SE_queryinfo_set_tables ( query_info,
929 1,
930 (const CHAR **) &(sde->table),
931 NULL);
932 if(status != SE_SUCCESS) {
933 sde_error( status,
934 "getSDEQueryInfo()",
935 "SE_queryinfo_create()");
936 return(NULL);
937 }
938
939 /* set the "where" clause */
940 if(!(layer->filter.string))
941 /* set to empty string */
942 status = SE_queryinfo_set_where_clause (query_info,
943 (const CHAR * ) "");
944 else
945 /* set to the layer's filter.string */
946 status = SE_queryinfo_set_where_clause (query_info,
947 (const CHAR * ) (layer->filter.string));
948 if(status != SE_SUCCESS) {
949 sde_error( status,
950 "getSDEQueryInfo()",
951 "SE_queryinfo_set_where_clause()");
952 return(NULL);
953 }
954
955 status = SE_queryinfo_set_columns( query_info,

Callers 1

msSDELayerWhichShapesFunction · 0.85

Calls 3

msSDELayerIsOpenFunction · 0.85
msSetErrorFunction · 0.85
sde_errorFunction · 0.85

Tested by

no test coverage detected