export

package
v1.128.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 15 Imported by: 0

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL