我是 ag grid 的新手,非常感谢您的帮助。
我正在查看 ag 网格站点的示例(https://next.plnkr.co/edit/pS6575GNn6MliLBD)
我有具有以下值的列:
export class AppComponent {
private gridApi;
private gridColumnApi;
private columnDefs;
private rowData;
private defaultColDef;
private getRowNodeId;
constructor() {
this.columnDefs = [
{
headerName: "Make",
field: "make"
},
{
headerName: "Model",
field: "model"
},
{
headerName: "Price",
field: "price",
filter: "agNumberColumnFilter"
}
];
this.rowData = [
{
id: "aa",
make: "Toyota",
model: "Celica",
price: 35000
},
{
id: "bb",
make: "Ford",
model: "Mondeo",
price: 32000
},
{
id: "cc",
make: "Porsche", …Run Code Online (Sandbox Code Playgroud) 我在同一条语句中选择ColA和ColB:
select distinct ColA, ColB, EDITABLE from TableA;
Run Code Online (Sandbox Code Playgroud)
我想使用ORDER BY lower(ColA),因为我想按字母顺序对ColA排序,而不考虑大写字母。ColB不必在这种排序中受到影响,我只想对ColA进行排序(由于在ColA中有许多具有相同值的实例,因此需要区分)。
我试过了
select distinct ColA, ColB, EDITABLE
from TableA
ORDER BY lower(ColA)
Run Code Online (Sandbox Code Playgroud)
并且也看到了关于独特性和有序性的问题,但是当我尝试
select distinct ColA, ColB, lower(ColA), EDITABLE
from TableA
GROUP BY ColA
ORDER BY lower(ColA) ASC, ColA
Run Code Online (Sandbox Code Playgroud)
我无法运行上面的语句。我是SQL的新手,我很乐意为您提供一些提示,以帮助您解决这个问题,并提出建议,以帮助您解决这个问题。
我是 Clojure 的新手,想将我拥有的 XML 转换为 edn 对象。
我读取的 XML 文件:
<Vehicle>
<Model>Toyota</Model>
<Color>Red</Color>
<Loans>
<Reoccuring>Monthly</Reoccuring>
<Owners>
<Owner>Bob</Owner>
</Owners>
</Loans>
<Tires>
<Model>123123</Model>
<Size>23</Size>
</Tires>
<Engine>
<Model>30065</Model>
</Engine>
</Vehicle>
Run Code Online (Sandbox Code Playgroud)
我把它保存为'test/resources/vehicle.xml
最终,我想要一个看起来像的 EDN 对象:
:Vehicle
:Model "Toyota"
:Color "Red"
:Loans
:Reoccuring "Monthly"
:Owners
:Owner "Bob"
:Tires
:Model 123123
:Size 23
:Engine
:Model 30065
Run Code Online (Sandbox Code Playgroud)
到目前为止,我在 Clojure 中尝试过的是 parse 方法:
(def xml-parser
(parse "<Vehicle><Model>Toyota</Model><Color>Red</Color><Loans><Reoccuring>Monthly</Reoccuring><Owners><Owner>Bob</Owner></Owners></Loans><Tires><Model>123123</Model><Size>23</Size></Tires><Engine><Model>30065</Model></Engine></Vehicle>"))
Run Code Online (Sandbox Code Playgroud)
但是,这将返回一个 Clojure 哈希,如下所示:
{:tag :Vehicle, :attrs nil, :content [{:tag :Model, :attrs nil, :content ["Toyota"]} {:tag :Color, :attrs nil, :content ["Red"]} {:tag …Run Code Online (Sandbox Code Playgroud) 我有属性文件 application-dev.yml ,内容如下:
spring.profiles: dev
config:
value: test
property: test2
foo:
value: test
property: test2
bar:
value: test
property: test2
Run Code Online (Sandbox Code Playgroud)
我的属性有一些冗余值,如果我想更改test为blah和test2to blah2,我必须转到文本的每个实例并更改它。
有什么方法可以(用Java术语)声明一个变量并将其分配给“test”,然后在整个yaml文件中使用该变量,以便我可以合并文本并使其在将来需要时更容易更改?