rsthn/rose-ext-csv
Composer 安装命令:
composer require rsthn/rose-ext-csv
包简介
CSV Utilities for Rose
README 文档
README
composer require rsthn/rose-ext-csv
Functions
(csv:load filename:str table_name:str extra_fields:dict?)
Loads a CSV file into a table. Each column can optionally have a type which will be mapped to a SQL type. The suffix can be one of the following:
| Suffix | SQL Type |
|---|---|
| :date | DATE |
| 📅d/m/y | DATE |
| :int | INT(10) |
| :primary | INT(10) PRIMARY KEY AUTO_INCREMENT |
| :numeric | DECIMAL(12,2) |
| :text | VARCHAR(4096) |
| :clean | VARCHAR(4096) |
| <default> | VARCHAR(256) |
(csv:load-temp filename:str table_name:str extra_fields:dict?)
Loads a CSV file into a temporary table. Each column can optionally have a type which will be
mapped to a SQL type. See: csv:load for more information.
(csv:read filename:str header:list?)
Reads a CSV file into memory.
(csv:clear auto_header:bool=false)
Clears the output CSV buffer.
(csv:separator separator:str)
Specifies the column separator character.
(csv:escape escape:bool)
Indicates whether or not to escape the CSV values in the output.
(csv:row-count)
Number of rows in the output CSV.
(csv:header column_names:list<str>)
Specifies the column headers for the output CSV.
(csv:row values:oneOf<dict, list>)
Adds a row of data to the output CSV.
(csv:rows rows:list<oneOf<dict, list>>))
Adds multiple rows of data to the output CSV.
(csv:data clear_after_read:bool=false)
Returns the output CSV buffer.
(csv:dump filename:str disposition:str?)
Dumps the output CSV buffer to the browser.
(csv:write filename:str BOM:bool=true)
Writes the output CSV buffer to a file.
rsthn/rose-ext-csv 适用场景与选型建议
rsthn/rose-ext-csv 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 97 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 03 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 rsthn/rose-ext-csv 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rsthn/rose-ext-csv 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 97
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2022-03-12