`
x放羊的星星
  • 浏览: 36649 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Query result in table

 
阅读更多
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               xmlns:esri="http://www.esri.com/2008/ags"
               xmlns:s="library://ns.adobe.com/flex/spark"
               pageTitle="Query Task (without a map)">
    <!--
         This sample shows how to query the server and displaying
         the result in a datagrid.
         The query is sent using the execute() method on a QueryTask.

         This sample sets up a QueryTask (what layer on what server to query).
         When the user clicks the "Get Details" button, a Query is sent with
         the user-provided text to search for.
         Meanwhile a DataGrid has been created which listens for the results
         (using executeLastResult) from the querytask.
    -->

    <s:layout>
        <s:VerticalLayout horizontalAlign="center" paddingTop="25"/>
    </s:layout>

    <fx:Declarations>
        <esri:QueryTask id="queryTask"
                        url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"
                        useAMF="false"/>
        <esri:Query id="query"
                    outFields="[STATE_NAME,STATE_FIPS,SUB_REGION,STATE_ABBR,POP2000,POP2007]"
                    returnGeometry="false"
                    text="{stateName.text}"/>
    </fx:Declarations>

    <s:Panel title="Using Query tasks without maps">
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
        <s:HGroup verticalAlign="middle">
            <s:Label text="US state name: "/>
            <s:TextInput id="stateName" text="Carolina"/>
            <s:Button click="queryTask.execute(query);" label="Get Details"/>
        </s:HGroup>
        <mx:DataGrid id="resultsGrid"
                     dataProvider="{queryTask.executeLastResult.attributes}"
                     visible="{queryTask.executeLastResult != null}">
            <mx:columns>
                <mx:DataGridColumn dataField="STATE_NAME" headerText="State Name"/>
                <mx:DataGridColumn dataField="SUB_REGION" headerText="Region"/>
                <mx:DataGridColumn dataField="STATE_FIPS" headerText="FIPS"/>
                <mx:DataGridColumn dataField="STATE_ABBR" headerText="Abbreviation"/>
                <mx:DataGridColumn dataField="POP2000" headerText="Population 2000"/>
                <mx:DataGridColumn dataField="POP2007" headerText="Population 2007"/>
            </mx:columns>
        </mx:DataGrid>
    </s:Panel>
</s:Application>

注:Query里面的属性text真正的查询条件是,featuryLayer里的Display field = '%text%'
  • 大小: 6.9 KB
分享到:
评论

相关推荐

    queryrunner的全部

    List&lt;MyObject&gt; result = runner.query(sql, handler, 123); // 123是参数值 // 处理查询结果 for (MyObject obj : result) { System.out.println(obj); } ``` 批量操作也是QueryRunner的一个强项,例如批量插入...

    bootstrap-table-demo

    $result = $conn-&gt;query($sql); $data = array(); if ($result-&gt;num_rows &gt; 0) { while($row = $result-&gt;fetch_assoc()) { $data[] = $row; } } else { echo "0 结果"; } $conn-&gt;close(); echo json_encode($...

    数据分析 power query formula

    ### 数据分析 Power Query Formula #### 一、引言与概述 在数据分析领域,Microsoft Power Query 是一个非常重要的工具,它能够帮助用户从多种数据源获取并整合数据,从而为更深层次的数据分析提供基础。Power ...

    SSD7 选择题。Multiple-Choice

    (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) writing an English description of the data that the user...

    PyPI 官网下载 | db2table-0.2.0-py3-none-any.whl

    query_result = db2table.query(connection, "SELECT * FROM my_table") # 将查询结果转换为DataFrame df = query_result.to_dataframe() # 现在你可以对df进行各种数据分析操作 ``` db2table库可能还提供了其他...

    微软内部资料-SQL性能优化5

     If the table is a heap (in other words, it has no clustered index), the bookmark is a RID, which is an actual row locator in the form File#:Page#:Slot#. Finding Rows with a NC Index on a Heap ...

    通过WCF Data Services访问Azure Table存储服务

    var query = from entity in context.YourEntityType where entity.PartitionKey == "partitionValue" && entity.RowKey == "rowValue" select entity; var result = query.Execute().ToList(); ``` 以上代码...

    clickhouse_en(1).pdf

    There is one large table per query. All tables are small, except for one. A query result is significantly smaller than the source data. In other words, data is filtered or aggregated, so the result ...

    Servlet查询数据库案例--Query(java源码)

    // Now try to execute the query and display the results in a table Statement statement = null; // An object to execute the query try { // Create a statement to use statement = db....

    购物网站中的购物车源代码

    $query = "SELECT * FROM $table WHERE session='$session' AND product='$product' "; $result = mysql_query($query); if(!$result) { return 0; } $numRows = mysql_num_rows($result); if($...

    query:从HyperLEDA Web数据访问服务查询

    查询HyperLEDA(query.hyperleda) 从HyperLEDA Web数据访问服务查询(注意:... query_object ( 'UGC12591' , properties = 'all' )&gt;&gt; &gt; print ( result_table ) # an astropy.table.Table pgc objname objtype ... c

    Java如何使用Query动态拼接SQL详解

    List, Object&gt;&gt; result = query.getResultList(); // ... } ``` 7. Java中使用Query语言动态拼接SQL的注意事项 在使用Query语言动态拼接SQL时,需要注意以下几点: * 安全性:Query语言可以防止SQL注入攻击,但...

    Devart UniDAC v5.3.10 Full Source

    -Now result parameter detection in UniConnection.ExecSQL is similar to the one in ODAC -Bug with connection establishing if the client has negative half-hour time zone is fixed -Bug with transactions ...

    hibernate多表查询详解

    Query&lt;Table2&gt; query = session.createQuery(hql, Table2.class); query.setParameter("value", someValue); List&lt;Table2&gt; table2List = query.getResultList(); // 处理Table2列表 for (Table2 table2 : table2...

    使用数据库记录动态填充HTML Table控件

    $result = $conn-&gt;query($sql); if ($result-&gt;num_rows &gt; 0) { // 输出数据 while($row = $result-&gt;fetch_assoc()) { echo "&lt;tr&gt;&lt;td&gt;" . $row["column1"] . "&lt;/td&gt;&lt;td&gt;" . $row["column2"] . "&lt;/td&gt;&lt;/tr&gt;"; } }...

    jQuery-easyUI pagination分页与普通table结合例子

    $result = mysqli_query($connection, $query); $data = array(); while ($row = mysqli_fetch_array($result)) { $data[] = $row; } $response = array( 'total' =&gt; $totalRows, // 总行数 'rows' =&gt; $data // ...

    qt 自定义参数工具 sqllite数据存储

    result["description"] = query.value(2).toString(); result["min"] = query.value(3).toInt(); result["max"] = query.value(4).toInt(); } } else { qCritical() ; } return result; } ``` 这些方法允许...

    SSD7 EX1 答案

    In the file Rel-ops.txt, list which relational operations you used, from among the select/project/join operations, in order to perform this query. Explain the role of each operation in your query. 4...

    DbMouse Pro 5.6.3

    Use data preview ofr analysing of query result. GPS Visualiser -Visualise points, polygons, and lines on map. Use Open Street Map, Goole Maps, Bing maps and more than 50 other popular map providers....

Global site tag (gtag.js) - Google Analytics