Data type casting

Open
#1,107 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
sqlite, swift
Domain
database

Research direction

Start by reproducing the mixed Double and Int column case described in the issue, including the Expression<Double>("obal") access and attempted cast. Read the SQLite.swift type-conversion behavior used by that expression and determine whether mixed numeric retrieval should be supported or documented; done means the behavior is clarified and any agreed fix is covered by a regression test.

Written by the indexing model from the issue text.

Description

question

I have a column in the table which contain both Double and Int value. So when I read the data with Int or Double type it threw me an error.

(vl[Expression<Double>("obal")]) as? Int

Can someone please guide how can I fetch the data with Double and Int type.

Dominant language
Swift
Stars
10.2k
Forks
1.6k
Avg merge
6d 2h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stephencelis/SQLite.swift

All issues in stephencelis/SQLite.swift

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.