Future data-intensive applications will have integrated circuit architectures combiningenergy-efficient transistors, high-density data storage and electro-optic sensing arrays in asingle chip to perform in situ processing of captured data. The costly dense wire connectionsin 3D integrated circuits and in conventional packaging and chip-stacking solutions couldaffect data communication bandwidths, data storage densities, and optical transmissionefficiency. Here we investigated all-ferroelectric nonvolatile LiNbO3transistors to functionthrough redirection of conducting domain walls between the drain, gate and source elec-trodes. The transistor operates as a single-pole, double-throw digital switch with com-plementary on/off source and gate currents controlled using either the gate or sourcevoltages. The conceived device exhibits high wall current density and abrupt off-and-on stateswitching without subthreshold swing, enabling nonvolatile memory-and-sensor-in-logic andlogic-in-memory-and-sensor capabilities with superior energy efficiency, ultrafast operation/communication speeds, and high logic/storage densities