Új hozzászólás Aktív témák
-
Siriusb
veterán
válasz
sztanozs
#1858
üzenetére
Persze, hogy nincs benne datum nevű oszlop, mert az csak alias, a valódi oszlop dateofrecording névre hallgat..
A problémám lényege az volt, hogy az alias csak "current_date" név lehet (hiába találtam ki a "datum" fantázianevet), ugye ez hivatkozik a valódi, a táblában megtalálható "dateofrecording" nevű oszlopra a konverter szintaktikájában:
datum AS "dateofrecording [date]"
alias AS "oszlopnév [adattípus]"
azaz a konverter megkapja a mező nevét a táblából "dateofrecording", valamint hogy milyen típusra konvertálja a tartalmát a lekérdezéskor: [date], de a hivatkozási név nem lehet "datum" vagy bármi más, csak és kizárólag a "current_date" név megadásával hajlandó működni a konverter.
Ez nem olyan nagy baj, csak lenne leírva.
Mert ebből nem derült ki számomra:sqlite3.PARSE_COLNAMES
This constant is meant to be used with the detect_types parameter of the connect() function.
Setting this makes the SQLite interface parse the column name for each column it returns. It will look for a string formed [mytype] in there, and then decide that ‘mytype’ is the type of the column. It will try to find an entry of ‘mytype’ in the converters dictionary and then use the converter function found there to return the value. The column name found in Cursor.description is only the first word of the column name, i. e. if you use something like 'as "x [datetime]"' in your SQL, then we will parse out everything until the first blank for the column name: the column name would simply be “x”.
Új hozzászólás Aktív témák
- Eladó One Plus Nord 2T 5G 8/128GB / 12 hó jótállás
- Apple iPhone 13 ProMax 256GB Kártyafüggetlen 1év Garanciával
- Használt számítógépek/merevlemezek számlával, garanciával! Ingyen Foxpost/PostaPont!
- Apple iPhone 13 Pro Max 128GB, Kártyafüggetlen, 1 Év Garanciával
- BESZÁMÍTÁS! ASUS H510M i5 11500 16GB DDR4 512GB SSD RX 6600XT 8GB Zalman T4 Plus Cooler Master 700W
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


