Buffer represents a table data structure with concurrent access support
| 61 | |
| 62 | // Buffer represents a table data structure with concurrent access support |
| 63 | type Buffer struct { |
| 64 | sep rune // Column separator character |
| 65 | cont [][]string // Table content (rows x columns) |
| 66 | colType []int // Column data types (colTypeStr or colTypeFloat) |
| 67 | rowLen int // Number of rows |
| 68 | colLen int // Number of columns |
| 69 | rowFreeze int // Number of frozen header rows (0 or 1) |
| 70 | colFreeze int // Number of frozen columns (0 or 1) |
| 71 | selectedCell [][]int // Selected cell coordinates |
| 72 | mu sync.RWMutex // Mutex for concurrent access |
| 73 | interners []*stringInterner // String interners per column (nil if not used) |
| 74 | internCols []bool // Track which columns use interning |
| 75 | memoryUsage int64 // Current estimated memory usage in bytes |
| 76 | maxMemory int64 // Maximum allowed memory in bytes (0 = no limit) |
| 77 | } |
| 78 | |
| 79 | const ( |
| 80 | // Pre-allocated capacity for rows (optimized for large files) |
nothing calls this directly
no outgoing calls
no test coverage detected