我有一个与Knex有关的问题。
目前,我正在使用两个版本的knex连接数据库。
一种使用这些配置的本地测试
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_centerInParent="true"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:indeterminate="false"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/progress_drawable"
android:secondaryProgress="0"></ProgressBar>
<TextView
android:id="@+id/txtProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="20pt"></TextView>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/progressBar"
android:text="Button" />
</RelativeLayout>
使用这些配置之一进行AWS RDS连接
client: 'pg',
connection: {
host: '127.0.0.1',
user: process.env.AURORA_DB_USER,
password: process.env.AURORA_DB_PASSWORD,
database: process.env.AURORA_DB_NAME,
},
但是在使用这两个版本获取数据时,我遇到了一个问题。
响应主体与下面的示例不同。
一个是返回普通数组,另一个是包含该数组的对象
使用本地knex获取:
“部门”:[ “消费者”, “成长” ]
使用rds knex实例获取:
“部门”:{ “ stringValues”:[ “企业”, “成长” ] }
和其他一些情况
我需要一些帮助来找出问题所在
答案 0 :(得分:0)
这听起来像是knex适配器中的错误。请在github仓库(https://github.com/markusahlstrand/knex-data-api-client)上创建一个问题,我来看看。
最好, 马库斯