forked from duckdb/duckdb-wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
137 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Update Mirror Issue | ||
on: | ||
issues: | ||
types: | ||
- closed | ||
- reopened | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.DUCKDBLABS_BOT_TOKEN }} | ||
TITLE_PREFIX: "[duckdb-wasm/#${{ github.event.issue.number }}]" | ||
|
||
jobs: | ||
update_mirror_issue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get mirror issue number | ||
run: | | ||
gh issue list --repo duckdblabs/duckdb-internal --search "${TITLE_PREFIX}" --json title,number --state all --jq ".[] | select(.title | startswith(\"$TITLE_PREFIX\")).number" > mirror_issue_number.txt | ||
echo "MIRROR_ISSUE_NUMBER=$(cat mirror_issue_number.txt)" >> $GITHUB_ENV | ||
- name: Print whether mirror issue exists | ||
run: | | ||
if [ "$MIRROR_ISSUE_NUMBER" == "" ]; then | ||
echo "Mirror issue with title prefix '$TITLE_PREFIX' does not exist yet" | ||
else | ||
echo "Mirror issue with title prefix '$TITLE_PREFIX' exists with number $MIRROR_ISSUE_NUMBER" | ||
fi | ||
- name: Add comment with status to mirror issue | ||
run: | | ||
if [ "$MIRROR_ISSUE_NUMBER" != "" ]; then | ||
gh issue comment --repo duckdblabs/duckdb-internal $MIRROR_ISSUE_NUMBER --body "The issue has been ${{ github.event.action }} (https://github.com/duckdb/duckdb-wasm/issues/${{ github.event.issue.number }})." | ||
fi | ||
- name: Add closed label to mirror issue | ||
if: github.event.action == 'closed' | ||
run: | | ||
if [ "$MIRROR_ISSUE_NUMBER" != "" ]; then | ||
gh issue edit --repo duckdblabs/duckdb-internal $MIRROR_ISSUE_NUMBER --add-label "public closed" --remove-label "public reopened" | ||
fi | ||
- name: Reopen mirror issue and add reopened label | ||
if: github.event.action == 'reopened' | ||
run: | | ||
if [ "$MIRROR_ISSUE_NUMBER" != "" ]; then | ||
gh issue reopen --repo duckdblabs/duckdb-internal $MIRROR_ISSUE_NUMBER | ||
gh issue edit --repo duckdblabs/duckdb-internal $MIRROR_ISSUE_NUMBER --add-label "public reopened" --remove-label "public closed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as duckdb from '../../src'; | ||
|
||
// https://github.com/duckdb/duckdb-wasm/issues/1833 | ||
export function test1833(db: () => duckdb.AsyncDuckDB): void { | ||
let conn: duckdb.AsyncDuckDBConnection; | ||
beforeEach(async () => { | ||
await db().flushFiles(); | ||
conn = await db().connect(); | ||
}); | ||
afterEach(async () => { | ||
await conn.close(); | ||
await db().flushFiles(); | ||
await db().dropFiles(); | ||
}); | ||
describe('GitHub issues', () => { | ||
it('1833', async () => { | ||
await conn.query(` | ||
CREATE TABLE "Test" (value VARCHAR) | ||
`); | ||
const stmt = await conn.prepare(` | ||
INSERT INTO "Test" (value) | ||
VALUES (?) | ||
`); | ||
await stmt.query('🦆🦆🦆🦆🦆'); | ||
await stmt.query('goo␀se'); | ||
await stmt.query('goo\u0000se'); | ||
const result = await conn.query(` | ||
SELECT * FROM "Test" | ||
`); | ||
expect(result.schema.fields.length).toBe(1); | ||
expect(result.schema.fields[0].name).toBe('value'); | ||
expect(result.toArray().length).toEqual(3); | ||
expect(result.toArray()[2].value.length).toEqual(6); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters