Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportQueryResults ¶
func ExportQueryResults(rowsInfo *db.DXDatabaseTableRowsInfo, rows []utils.JSON, opts ExportOptions) error
func ExportToStream ¶
func ExportToStream(rowsInfo *db.DXDatabaseTableRowsInfo, rows []utils.JSON, opts ExportOptions) ([]byte, string, error)
Types ¶
type ExportFormat ¶
type ExportFormat string
const ( CSV ExportFormat = "csv" XLS ExportFormat = "xls" // XLSX is what a caller asking for a spreadsheet almost always names, and // tables.DXTableExportFormatEnumSetAll has offered it as a valid choice all // along. It was missing here, so every request for it was answered // "unsupported export format: xlsx" before a byte was written. It writes the // same bytes as XLS: utils/xlsx produces OOXML either way, which is why the // content type for XLS is already the OOXML one. XLSX ExportFormat = "xlsx" )
type ExportOptions ¶
type ExportOptions struct {
Format ExportFormat
FilePath string
SheetName string
DateFormat string
Timezone string // Target timezone for timestamp display (e.g. "Asia/Jakarta"); empty = use original
Language language.DXLanguage // Language for header translation
TranslateFallback language.DXTranslateFallbackMode // Fallback mode for missing translations
}
Click to show internal directories.
Click to hide internal directories.